using System;
class Constructor
{
public Constructor()
{
Console.WriteLine("I'm from public Constructor");
}
static Constructor()
{
Console.WriteLine("I'm from static Constructor");
}
public void Method()
{
Console.WriteLine("I'm from Method");
}
}
|
Class Constructor
Public Sub New()
Console.WriteLine("I'm from public Constructor")
End Sub
Shared Sub New()
Console.WriteLine("I'm from static Constructor")
End Sub
Public Sub Method()
Console.WriteLine("I'm from Method")
End Sub
End Class
|