Coding in C# for a VB.net developer

Hi

I have been coding in VB.net for a few years now and have been given a possible 4 month project to re-engineer an ASP.net site written in C#.
I need to get up and running in C# as quickly as possible. Could someone please refer me to
a resource or two for getting to know C# for a VB.net developer and maybe a place to convert the code. Thanks
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
 
NavneetSoftware EngineerCommented:
Hi!

This is good place for your Code Conversion.
http://converter.telerik.com/

Good Cross refrence like
http://www.harding.edu/fmccown/vbnet_csharp_comparison.html

Thanks!
0
 
CodeCruiserCommented:
I have been using VB.NET for 8 years. I am a VB MVP. But since September, I am coding C# in my new job. Its just a matter of getting used to those curly braces and semicolons.
0
 
käµfm³d 👽Commented:
I agree with CodeCruiser. I started with VB, but I now work in C# (and write VB only on EE). If you are familiar with .NET classes, then your primary concern is focusing on C#-specific syntax (which is C-style a.k.a. Java-style). You also have to be mindful that C# is case-sensitive (where VB is not), and a few other subtleties like the difference in adding dynamic event handlers, implicit conversions/casts, and no difference in Sub and Function (a "Sub" in C# is a function that "returns" void), to name a few.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
käµfm³d 👽Commented:
implicit conversions/casts
I should have expanded that a bit. VB, if you let it, allows a good bit of implicit conversion. In C#, you have to explicitly cast unless you override an implicit operator on your class (you can't override the operator for Framework classes).
0
 
CimperialiCommented:
my two cents:
Do not forget that in VB you say "give me a zero to 4 array" when you want a 5 cells array, while in c# you say "give me 5 cells array" - that is
string[5] myArray
is a 0 to 4 array...
 
Another handly stuff in vb is the Handles keyword you can put on routines to manage events around. in c# you must get accustomed to the += delegate_for_event_handlers sintax

But as others said, the common language runtime and base classes are still there. By the way, if you're in difficoult, remember you could always have vb.net dll invoked from c# (and vice versa, of course). That is: if you have a hard time, you could wrap some useful code in a dll and add a reference to it inside your c# stuff...
0
 
MattiCommented:
Hi!

http://www.icsharpcode.net/opensource/sd/
In This tool you can select Your #C code to be converted and saved as .NET code

Matti
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
I appeciate the help. Pity I can't award more points to you each
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.