VB.NET vs C# OOP.

M

Mr. X.

Hello.
In VB.NET when I write a constructor, sometimes I call : MyBase. ...
or MyClass. ...

What is the equivalent in C#?
Does I have to call at the same way I used in VB.NET?

Thanks :)
 
J

Jeff Johnson

In VB.NET when I write a constructor, sometimes I call : MyBase. ...
or MyClass. ...

In addition to Pete's reply, I'll mention that C# has no equivalent to VB's
MyClass keyword.
 
J

Jeff Johnson

No 100% direct equivalent, true. But in the context of constructors (i.e.
the given question), C# provides an equivalent to calling
"MyClass.New(.)". The doc page for which I provided a link describes that
(among other things).

Ahhh, I didn't know that was one of the uses of MyClass.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top