how to convert from vb.net to C# ?

Recommended Answers

Hi, you may try this one but some syntax you need to rectify on your own or you can post them here also.
http://converter.telerik.com/

Jump to Post

All 3 Replies

While there might be a tool out there to do the conversion, I wouldn't trust it. The appropriate way is to know both languages and convert manually. However, since assemblies written in either language are interoperable, there's no need to convert unless you're trying to match company standards where only C# is used. And even then, the conversion effort should be minimal unless you're "borrowing" significant chunks of code from somewhere else. ;)

language conversion can be done with string replaces.

c++,java,js,perl,php,c# and c# are lower case and basic and fortran are case-insensitive.

basic c++

begin {
end }
FOR arg1 = arg2 TO arg3 STEP arg4 for(arg1 = arg2; arg1 < arg3; arg1+=arg4) (c++ and c# are lower case)
FOR arg1 = arg2 TO arg3 for(arg1 = arg2; arg1 < arg3; arg1++)
MID(arg1,arg2,arg3) arg1.substr(arg2,arg3)
MID(arg1,arg2) arg1.substr(arg2)

and then it requires manual editing afterwards.

but this really should be done with a parser and lexer (compiler technology), and requires both language standards and permission and cost $700 from ansi.org or microsoft.com (https://docs.microsoft.com/en-us/welcome-to-docs) and it's real hard to find. I would highly suggest the lex & yacc book from o'reilly publishing and lex and yacc or flex and bison. they are avaiable for $2000 for now.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.