Section C#: (Automatic With Different Signature)
Section C#: (Automatic With Different Signature)
C# VB.NET
private Private
public Public
protected Protected
internal Friend
protected internal Protected Friend
static Shared
sealed (class) NotInheritable
sealed (method) NotOverridable
abstract (class) MustInherit
abstract (method) MustOverride
new Shadows
override Overrides
virtual Overridable
readonly ReadOnly
volatile [Unavailable]
[Automatic with Overloads
different signature]
Section C# VB.NET
Namespace using [Namespace]; Imports [Namespace]
Class
Simple define [Modifier] class [Name] [Modifier] Class [Name]
{ ...
... End Class
}
Inheritance : Inherits
Interface : [Class*], [Interface] Implements
Implementation
Static static MustInherit NotInheritable
Constructor
Declaration [Modifier] [class name] [Modifier] Sub New
([Parameters]) ([Parameters])
{ ...
... End Sub
}
Instance creation new [Type]([Parameters] New [Type]([Parameters
Method
[Modifier] void [Name]() [Modifier] Sub [Name]
Method { ([Parameters])
(procedure) ... ...
} End Sub
[Modifier] [Type] [Name] [Modifier] Function [Name]() As
Method ([Parameters]) [Type]
(function) { ...
... End Function
}
Parameter by value [Default] ByVal
Output Parameter out ByRef
Reference ref ByRef
parameter
Property
[Modifier] [Type] [Name] [Modifier] Property [Name]() As
Read / Write { [Type]
get {...} Get
set {...} ...
} End Get
Delegate
Procedure [Modifier] delegate void [Modifier] Sub Delegate [Name]
[Name] ([parameters]); ([Parameters])
Access [] ()
Document Source:
http://devolutions.net/articles/dot-net/C-Sharp-to-VB-Net.aspx