473,322 Members | 1,719 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Equivalent C# keyword

Hi,
Just curious to know if there's a keyword equivalent to "Myclass" in VB.Net
in C#

TIA
Krishnan
Nov 15 '05 #1
9 2042
I think its 'base'

Me == this
MyClass == base
Krishnan wrote:
Hi,
Just curious to know if there's a keyword equivalent to "Myclass" in VB.Net
in C#

TIA
Krishnan


Nov 15 '05 #2
Hi Harvey,
Thanks for your reply. Am sorry, but, I don't believe that to be the case. I
have tried to explain this with an example:

[VB.Net code]
Module Module1

Sub Main()

Dim b As Base

b = New Derived1

b.Test()

End Sub

End Module

Class Base

Public Sub Test()

Me.Foo()

MyClass.Foo()

End Sub

Public Overridable Sub Foo()

Console.WriteLine("Base - Foo")

End Sub

End Class

Class Derived1

Inherits Base

Public Overrides Sub Foo()

Console.WriteLine("Derived1 - Foo")

End Sub

End Class

Output:
=====
Derived1 - Foo
Base - Foo
In other words, MyClass makes the call to the function always on the "same"
class ireespective of the inheritance chain, wihle the rule in inheritance
is to call the "most" derived form of the method(as is done by the line
Me.Foo(). Please let me know if you think that this scenario can be
simulated in C#, and if so how. I'd be grateful if you can post your code
snippet here.

TIA
Krishnan

"Harvey Green" <no****@somewhere.com> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
I think its 'base'

Me == this
MyClass == base
Krishnan wrote:
Hi,
Just curious to know if there's a keyword equivalent to "Myclass" in VB.Net in C#

TIA
Krishnan

Nov 15 '05 #3
Hi Krishnan,

huh, I don't think that C# has an equivalent.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"Krishnan" <kr*********************@myrealbox.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,
Just curious to know if there's a keyword equivalent to "Myclass" in VB.Net in C#

TIA
Krishnan

Nov 15 '05 #4
Hi Harvey,
Thanks for your reply. Am sorry, but, I don't believe that to be the case. I
have tried to explain this with an example:

[VB.Net code]
Module Module1

Sub Main()

Dim b As Base

b = New Derived1

b.Test()

End Sub

End Module

Class Base

Public Sub Test()

Me.Foo()

MyClass.Foo()

End Sub

Public Overridable Sub Foo()

Console.WriteLine("Base - Foo")

End Sub

End Class

Class Derived1

Inherits Base

Public Overrides Sub Foo()

Console.WriteLine("Derived1 - Foo")

End Sub

End Class

Output:
=====
Derived1 - Foo
Base - Foo
In other words, MyClass makes the call to the function always on the "same"
class ireespective of the inheritance chain, wihle the rule in inheritance
is to call the "most" derived form of the method(as is done by the line
Me.Foo(). Please let me know if you think that this scenario can be
simulated in C#, and if so how. I'd be grateful if you can post your code
snippet here.

TIA
Krishnan

"Harvey Green" <no****@somewhere.com> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
I think its 'base'

Me == this
MyClass == base
Krishnan wrote:
Hi,
Just curious to know if there's a keyword equivalent to "Myclass" in VB.Net in C#

TIA
Krishnan

Nov 15 '05 #5
Hi Krishnan,

huh, I don't think that C# has an equivalent.

--
Miha Markic - RightHand .NET consulting & software development
miha at rthand com

"Krishnan" <kr*********************@myrealbox.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Hi,
Just curious to know if there's a keyword equivalent to "Myclass" in VB.Net in C#

TIA
Krishnan

Nov 15 '05 #6
Krishian,

There is no equivalent to it in c#.

Klaus

"Krishnan" <kr*********************@myrealbox.com> schrieb im Newsbeitrag
news:uv**************@TK2MSFTNGP10.phx.gbl...
Hi Harvey,
Thanks for your reply. Am sorry, but, I don't believe that to be the case. I have tried to explain this with an example:

[VB.Net code]
Module Module1

Sub Main()

Dim b As Base

b = New Derived1

b.Test()

End Sub

End Module

Class Base

Public Sub Test()

Me.Foo()

MyClass.Foo()

End Sub

Public Overridable Sub Foo()

Console.WriteLine("Base - Foo")

End Sub

End Class

Class Derived1

Inherits Base

Public Overrides Sub Foo()

Console.WriteLine("Derived1 - Foo")

End Sub

End Class

Output:
=====
Derived1 - Foo
Base - Foo
In other words, MyClass makes the call to the function always on the "same" class ireespective of the inheritance chain, wihle the rule in inheritance
is to call the "most" derived form of the method(as is done by the line
Me.Foo(). Please let me know if you think that this scenario can be
simulated in C#, and if so how. I'd be grateful if you can post your code
snippet here.

TIA
Krishnan

"Harvey Green" <no****@somewhere.com> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
I think its 'base'

Me == this
MyClass == base
Krishnan wrote:
Hi,
Just curious to know if there's a keyword equivalent to "Myclass" in VB.Net in C#

TIA
Krishnan


Nov 15 '05 #7
Thanks Klaus & Miha.

Krishnan

"Klaus Löffelmann" <fo***********@loeffelmann.de> wrote in message
news:Oc**************@tk2msftngp13.phx.gbl...
Krishian,

There is no equivalent to it in c#.

Klaus

"Krishnan" <kr*********************@myrealbox.com> schrieb im Newsbeitrag
news:uv**************@TK2MSFTNGP10.phx.gbl...
Hi Harvey,
Thanks for your reply. Am sorry, but, I don't believe that to be the case.
I
have tried to explain this with an example:

[VB.Net code]
Module Module1

Sub Main()

Dim b As Base

b = New Derived1

b.Test()

End Sub

End Module

Class Base

Public Sub Test()

Me.Foo()

MyClass.Foo()

End Sub

Public Overridable Sub Foo()

Console.WriteLine("Base - Foo")

End Sub

End Class

Class Derived1

Inherits Base

Public Overrides Sub Foo()

Console.WriteLine("Derived1 - Foo")

End Sub

End Class

Output:
=====
Derived1 - Foo
Base - Foo
In other words, MyClass makes the call to the function always on the

"same"
class ireespective of the inheritance chain, wihle the rule in

inheritance is to call the "most" derived form of the method(as is done by the line
Me.Foo(). Please let me know if you think that this scenario can be
simulated in C#, and if so how. I'd be grateful if you can post your code snippet here.

TIA
Krishnan

"Harvey Green" <no****@somewhere.com> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
I think its 'base'

Me == this
MyClass == base
Krishnan wrote:
> Hi,
> Just curious to know if there's a keyword equivalent to "Myclass" in

VB.Net
> in C#
>
> TIA
> Krishnan
>
>



Nov 15 '05 #8
Krishian,

There is no equivalent to it in c#.

Klaus

"Krishnan" <kr*********************@myrealbox.com> schrieb im Newsbeitrag
news:uv**************@TK2MSFTNGP10.phx.gbl...
Hi Harvey,
Thanks for your reply. Am sorry, but, I don't believe that to be the case. I have tried to explain this with an example:

[VB.Net code]
Module Module1

Sub Main()

Dim b As Base

b = New Derived1

b.Test()

End Sub

End Module

Class Base

Public Sub Test()

Me.Foo()

MyClass.Foo()

End Sub

Public Overridable Sub Foo()

Console.WriteLine("Base - Foo")

End Sub

End Class

Class Derived1

Inherits Base

Public Overrides Sub Foo()

Console.WriteLine("Derived1 - Foo")

End Sub

End Class

Output:
=====
Derived1 - Foo
Base - Foo
In other words, MyClass makes the call to the function always on the "same" class ireespective of the inheritance chain, wihle the rule in inheritance
is to call the "most" derived form of the method(as is done by the line
Me.Foo(). Please let me know if you think that this scenario can be
simulated in C#, and if so how. I'd be grateful if you can post your code
snippet here.

TIA
Krishnan

"Harvey Green" <no****@somewhere.com> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
I think its 'base'

Me == this
MyClass == base
Krishnan wrote:
Hi,
Just curious to know if there's a keyword equivalent to "Myclass" in VB.Net in C#

TIA
Krishnan


Nov 15 '05 #9
Thanks Klaus & Miha.

Krishnan

"Klaus Löffelmann" <fo***********@loeffelmann.de> wrote in message
news:Oc**************@tk2msftngp13.phx.gbl...
Krishian,

There is no equivalent to it in c#.

Klaus

"Krishnan" <kr*********************@myrealbox.com> schrieb im Newsbeitrag
news:uv**************@TK2MSFTNGP10.phx.gbl...
Hi Harvey,
Thanks for your reply. Am sorry, but, I don't believe that to be the case.
I
have tried to explain this with an example:

[VB.Net code]
Module Module1

Sub Main()

Dim b As Base

b = New Derived1

b.Test()

End Sub

End Module

Class Base

Public Sub Test()

Me.Foo()

MyClass.Foo()

End Sub

Public Overridable Sub Foo()

Console.WriteLine("Base - Foo")

End Sub

End Class

Class Derived1

Inherits Base

Public Overrides Sub Foo()

Console.WriteLine("Derived1 - Foo")

End Sub

End Class

Output:
=====
Derived1 - Foo
Base - Foo
In other words, MyClass makes the call to the function always on the

"same"
class ireespective of the inheritance chain, wihle the rule in

inheritance is to call the "most" derived form of the method(as is done by the line
Me.Foo(). Please let me know if you think that this scenario can be
simulated in C#, and if so how. I'd be grateful if you can post your code snippet here.

TIA
Krishnan

"Harvey Green" <no****@somewhere.com> wrote in message
news:Op**************@TK2MSFTNGP09.phx.gbl...
I think its 'base'

Me == this
MyClass == base
Krishnan wrote:
> Hi,
> Just curious to know if there's a keyword equivalent to "Myclass" in

VB.Net
> in C#
>
> TIA
> Krishnan
>
>



Nov 15 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Phil Powell | last post by:
<?php class SuperClass { var $mySuperClassVar; function SuperClass($myVar) { $this->mySuperClassVar = $myVar; echo "super class var = $myVar<p>"; }
9
by: Chazza | last post by:
I would like to override a method from an inherited class, but the new method has a different signature to the inherited class. Example: class A { private void Init() { // code } } class B...
5
by: tlemcenvisit | last post by:
Hello in C# : Partial type definitions allow the definition of a class, struct or interface to be split into multiple files. I'd like to have the equivalent keyword of partial in VC++ does...
7
by: Krishnan | last post by:
Hi, Just curious to know if there's a keyword equivalent to "Myclass" in VB.Net in C# TIA Krishnan
10
by: Bishoy | last post by:
Hi, In VB.NET there is a keyword called "My" which has a lot of properties collected at it. Is there any equivalent to this "My" in C#? Thank you.
12
by: rodchar | last post by:
hey all, vb has a static keyword for variables, what is charp's equivalent,please? static tempVar as String thanks, rodchar
1
by: trialproduct2004 | last post by:
Hi all, can any one tell me use of shadow keyword in vb.net and its equivalent in c# with e.g. Please help me. thanks in advance.
15
by: tereglow | last post by:
Hello all, I come from a shell/perl background and have just to learn python. To start with, I'm trying to obtain system information from a Linux server using the /proc FS. For example, in...
3
by: Friedman, Jason | last post by:
I have lines that look like this: select column1, 'select' as type from table where column2 = 'foo' I want to return: SELECT column1, 'select' AS type FROM table WHERE column2 = 'foo'
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.