I just wanted to post some stuff I have come across lately porting my C# code over to VB.NET:
use quick find replace to remove all ; at end of statements
use shared instead of static
use single instead of float
use directcast() to cast objects from one type to another
use IIF for C# conditional operator
use nothing instead of null
use Imports instead of Using
use () instead of [] for arrays
use ' for comments
use ''' for XML comments
sub new() for constructor instead of class name
and the weirdest thing I have come across is using [] around words that are keywords in VB so they don't confuse VB compiler.
Like [enum]
I always wondered what the hell people were using those around certain words
well that's all I can think of right now off the top of my head
Tips for anyone converting C# code to VB.NET
Started by daviangel, Dec 05 2006 09:25 AM
2 replies to this topic
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












