当前位置:IT168首页 > 技术开发 > 概述
[收藏此页] [打印] [推荐] [评论]

c# 中的delegate

责任编辑:nancy作者:ITPUB论坛   2008-07-08   
文本Tag: 微软 sql

【IT168技术文档】


class Program 2 { 3 public delegate void MyDelegate(String name); //声明代理 4 5 public static void MyDelegateFunc(String name) 6 { 7 System.Console.WriteLine("hello:" + name); 8 } 9 static void Main(string[] args) 10 { 11 MyDelegate m = new MyDelegate(MyDelegateFunc); //创建代理对象 12 m("snow"); //调用代理 13 System.Console.Read(); 14 } 15 }
上一页
1
下一页
收藏到: 添加到“百度搜藏”添加到“QQ书签”添加到“Google书签”添加到“Yahoo收藏”添加到“和讯网摘”
【内容导航】
本文欢迎转载,转载请注明:转载自IT168 [ http://www.it168.com/ ]
本文链接:http://tech.it168.com/d/2008-07-08/200807081207844.shtml
技术开发相关文章  
  • 暂无
友情推介