C# / VB Syntax

As I’m working on my presentation on C# for VB(6) programmers for DevConnections (which is not aimed at converting people, but assisting them to be fluent in C# when they need to) I enjoy finding the perspective of C# developers going to VB. In Sahil Malek’s blog post about this, I loved seeing  the comment that it is confusing to use parens for so many purposes – such as indices or passing parameters – whereas C# uses [] for indices. I am just so used to that from years of working with VB! But it makes sense that it might be confusing. It’s a fun thread to read if you do find yourself swinging both ways with your code.

But my two faves in the thread are:

…if you are on my project team and you name variables in c# as follows:
foo
Foo
FOO
I’m going to kick your ass because it’s a pain in the ass to read.

and

I have the best VB.NET to C# converter on the Market and it’s only one line:
MessageBox.Show(“LearnC#Goddamit!”)

I hope that Bill appreciates my talk!

 

http://www.AcehAid.org

  Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!  

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.