.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issues with Converting C#.NET code into VB.Net code

4 REPLIES 4
Reply
Message 1 of 5
HEnnulat
259 Views, 4 Replies

Issues with Converting C#.NET code into VB.Net code


Feel free to add on for other issues with translating C# code as well as approaches and solutions so as many solutions as possible appear in one place.
-------------------------------------------------------------------------------------------------------------------------
My translator (.Net Reflector 5.0) was unable to convert the C# "this" statement into something VB.Net understood.

For example the C# statement:
- this.ids = new ObjectIdCollection();

Got translated into:
- Dim CS$1$0000 As ObjectIdCollection

Any ideas how to properly translate this to VB.Net.... this is kind of like Abbot and Kostello's "Who's on First"....

This came from code Tony Tanzillo linked in the "Working With Nested Blocks" thread on Nov 12 and repeated below:
http://www.caddzone.com/BlockExplodeHelper.cs

4 REPLIES 4
Message 2 of 5
jerrywinters
in reply to: HEnnulat

That looks like a bad translation.

It looks like the variable 'ids' is declared as a variable in the Class. The keyword 'this' indicates it is a member of the current Class. A literal translation into VB.NET would look like:

{code}
Me.ids = new ObjectIDCollection()
{code}

Hope this helps.

Jerry
Message 3 of 5
divyasree
in reply to: HEnnulat

Hi

try out this. this will help u.

http://www.developerfusion.com/tools/convert/csharp-to-vb/

With Regards
divya
Message 4 of 5
HEnnulat
in reply to: HEnnulat

Thanks Divya and Jerry,

The online code converter converted the C# code to exactly what Jerry noted.

Does Reflector not support the 3.5 .NET framework? (See Attached Image). Or is there some configuration thing I missed?...

I thought Reflector is the converter of choice? If not what is? Tony, what are you using? Edited by: HEnnulat on Nov 19, 2009 10:15 AM
Message 5 of 5
Anonymous
in reply to: HEnnulat

Reflector doesn't always do a true translation of code.

I would probably try one of the online translators that are
available, searching the newsgroup should turn up a few
links to them if no one else can refer you to one.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6291194@discussion.autodesk.com...
Feel free to add on for other issues with translating C# code as well as
approaches and solutions so as many solutions as possible appear in one
place. -------------------------------------------------------------------------------------------------------------------------
My translator (.Net Reflector 5.0) was unable to convert the C# "this"
statement into something VB.Net understood. For example the C# statement: -
this.ids = new ObjectIdCollection(); Got translated into: - Dim CS$1$0000 As
ObjectIdCollection Any ideas how to properly translate this to VB.Net....
this is kind of like Abbot and Kostello's "Who's on First".... This came
from code Tony Tanzillo linked in the "Working With Nested Blocks" thread on
Nov 12 and repeated below: http://www.caddzone.com/BlockExplodeHelper.cs

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost