I needed a quick cheat sheet that compares C# keywords with those that VB.Net uses so that I could perform a code-walkthrough on someone else’s code. Here is what I came up with:
C# | VB.Net |
this | Me |
base | MyBase |
static | Shared |
sealed | NotInheritable (class definitions)NotOverridable (class methods) |
abstract | MustInherit (class definitions)MustOverride (class methods) |
virtual | Overridable |
null | Nothing note: setting a variable to Nothing in VB.Net, actually sets it to its default value. On reference types this is equivalent to null in C#. |
DBNull.Value | NULL |
typeof | GetType |
if x is {type} | if TypeOf x is {type} |
Thanks for this nice blog.
ReplyDelete