제목 : 9.5. 예제. 스태틱과인스턴스.cs
    
    
        
            
                | 글번호: |  | 296 | 
            
                | 작성자: |  | 레드플러스 | 
            
                | 작성일: |  | 2005/07/18 오전 10:57:00 | 
            
            
                | 조회수: |  | 7051 | 
            
        
     
 
    
	
	
    
	using System;
namespace 스태틱과인스턴스
{
    public class 테스트
    {
        public static void StaticMethod(string strTemp)
        {
            Console.WriteLine("static : {0}", strTemp);
        }
        public void InstanceMethod(string strTemp)
        {
            Console.WriteLine("instance : {0}", strTemp);
        }
    }
    public delegate void DelegateType(string strTemp);
    public class 메인
    {
        public static void Main(string[] args)
        {
            DelegateType dt = new DelegateType(테스트.StaticMethod);
            dt("델리게이트");
            테스트 t = new 테스트();
            dt = new DelegateType(t.InstanceMethod);
            dt("대리자");
        }
    }
}