C# to VB.Net conversion problem?

  • Thread starter Thread starter Özden Irmak
  • Start date Start date
Ö

Özden Irmak

Hello,

This code line works on C# :

MainComponent.gettype()

where Maincomponent is a type of IComponent but I couldn't convert it to
VB.Net. This way generates a warning in the designer as "Type
'MainComponent' is not defined." :

GetType(MainComponent)

Any Suggestion?

Also, does anybody know a guide (website,etc.) which will help me on my work
to convert some code from C# to VB.Net?

Thanks in advance...

Özden
 
Hello Jan,

Thanks for your interest firstly...

1) As I don't do a comparison on types this won't work.

2) Automatic converters converts this line as it is but .gettype is not
exposed in VB.Net although it's so in C#.

Any other suggestion?

Özden
 
Ic, my fault!

Can't you use MainComponent.GetType ? That should work in VB.NET? Maybe you
can post a little bit more code you want to translate...
 
Hi,

There is a C# to VB converter addin in the vb.net resource kit. On
the additional resources tab under useful utilites.

Ken
-------------
 
Back
Top