473,396 Members | 2,002 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,396 software developers and data experts.

C# to VB.Net conversion problem?

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
Nov 20 '05 #1
5 1021
1) you can use typeof(MainComponent) instead of GetType(MainComponent)

2) Automatic conversion from C# to VB.NET
http://www.kamalpatel.net/ConvertCSharp2VB.aspx

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Özden Irmak" <oz********@isnet.net.tr> schreef in bericht
news:%2****************@tk2msftngp13.phx.gbl...
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

Nov 20 '05 #2
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

"Jan Tielens" <ja*@no.spam.please.leadit.be> wrote in message
news:ed**************@TK2MSFTNGP11.phx.gbl...
1) you can use typeof(MainComponent) instead of GetType(MainComponent)

2) Automatic conversion from C# to VB.NET
http://www.kamalpatel.net/ConvertCSharp2VB.aspx

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Özden Irmak" <oz********@isnet.net.tr> schreef in bericht
news:%2****************@tk2msftngp13.phx.gbl...
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


Nov 20 '05 #3
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...

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Özden Irmak" <oz********@isnet.net.tr> schreef in bericht
news:u3**************@TK2MSFTNGP12.phx.gbl...
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

"Jan Tielens" <ja*@no.spam.please.leadit.be> wrote in message
news:ed**************@TK2MSFTNGP11.phx.gbl...
1) you can use typeof(MainComponent) instead of GetType(MainComponent)

2) Automatic conversion from C# to VB.NET
http://www.kamalpatel.net/ConvertCSharp2VB.aspx

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Özden Irmak" <oz********@isnet.net.tr> schreef in bericht
news:%2****************@tk2msftngp13.phx.gbl...
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



Nov 20 '05 #4
Hi,

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

Ken
-------------
"Jan Tielens" <ja*@no.spam.please.leadit.be> wrote in message
news:ed**************@TK2MSFTNGP11.phx.gbl...
1) you can use typeof(MainComponent) instead of GetType(MainComponent)

2) Automatic conversion from C# to VB.NET
http://www.kamalpatel.net/ConvertCSharp2VB.aspx

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Özden Irmak" <oz********@isnet.net.tr> schreef in bericht
news:%2****************@tk2msftngp13.phx.gbl...
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


Nov 20 '05 #5
I use this site to translate C# to VB:

http://authors.aspalliance.com/aldot...translate.aspx

--
Joe Fallon


"Özden Irmak" <oz********@isnet.net.tr> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
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

Nov 20 '05 #6

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

Similar topics

1
by: Vladimir Khvostov | last post by:
Hi, We have some DB2 table on the host that has varchar(3200) columns that are used to store binary data (I know that "varchar(3200) for bit data" should have been used, by modifying host table is...
31
by: Bjørn Augestad | last post by:
Below is a program which converts a double to an integer in two different ways, giving me two different values for the int. The basic expression is 1.0 / (1.0 * 365.0) which should be 365, but one...
11
by: Steve Gough | last post by:
Could anyone please help me to understand what is happening here? The commented line produces an error, which is what I expected given that there is no conversion defined from type double to type...
3
by: Steve Richter | last post by:
here is a warning I am getting in a C++ .NET compile: c:\SrNet\jury\JuryTest.cpp(55) : warning C4927: illegal conversion; more than one user-defined conversion has been implicitly applied while...
0
by: VB Programmer | last post by:
Simple ASP.NET 1 site. Opened solution in beta 2 of 2.0. Ran thru conversion wizard and it states: "Conversion Complete. There were some errors during conversion." I view the conversion log...
4
by: Påhl Melin | last post by:
I have some problems using conversion operators in C++/CLI. In my project I have two ref class:es Signal and SignalMask and I have an conversion function in Signal to convert Signal:s to...
14
by: Richard G. Riley | last post by:
Would it be wrong to use "implicit casting" instead of the standards "implicit conversion" when talking about implicit conversions between certain data types. The standard mentions "explicit...
6
by: Dhirendra Singh | last post by:
Hi, The following C++ program is not compiling on my system. #include <iostream> using namespace std; class complex { double re, im; public: complex( ) :re(0), im(0) {}
4
by: Coleen | last post by:
Hi All :-) I'm new to this site. I've been trying to convert several .Net 2003 web applications and getting tons of conversion errors. I found this site to help walk me through the...
8
by: Nikola | last post by:
Hello, I'm writing a String class for C++ and I'm getting the following error message when using operator: test.cpp: In function ‘int main()’: test.cpp:7: error: ISO C++ says that these are...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.