好吧,最近闲着开始记点东西

   花点时间装上了windows live write,有空写写。
  先测试一下,来段代码:     
#region 委托小例子
public class Test
{

    
public delegate viod MyDelegate();

    
public void ProcessDelegate(MyDelegate myDelegate)
    {
        myDelegate();
    }
}

public class TestMain
{
    
public static void Main()
    {
        Test test 
= new Test();
        test.ProcessDelegate(SayA);
        test.ProcessDelegate(SayB);
    }

    
public void SayA()
    { Console.WriteLine(
"A"); }

    
public void SayB()
    {
        Console.WriteLine(
"B");
    }
}
#endregion

 接着无聊一个

          不要点我

 

posted @ 2010-09-08 14:10  真名士  阅读(194)  评论(0)    收藏  举报