링크 : http://msdn.microsoft.com/ko-kr/library/k9x6w0hc(v=vs.80).aspx 

 

public class Bus
{
    // Static constructor:
    static Bus()
    {
        System.Console.WriteLine("The static constructor invoked.");
    }

    public static void Drive()
    {
        System.Console.WriteLine("The Drive method invoked.");
    }
}

class TestBus
{
    static void Main()
    {
        Bus.Drive();
    }
}

'.Net > C#' 카테고리의 다른 글

[C#] Visual Studio TODO 만들기  (0) 2013.01.30
[C#] Form close와 Dispose  (0) 2013.01.28
[C#] Assemble.load  (0) 2013.01.15
[Visual Studio 2010] C# 선언할때 공백 제거 문제  (0) 2013.01.14
[C#] C# as 연산자  (0) 2013.01.09
posted by 뚱2