惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cloudbric
Cloudbric
P
Palo Alto Networks Blog
T
Threatpost
T
Tor Project blog
T
Tenable Blog
AWS News Blog
AWS News Blog
Project Zero
Project Zero
L
LangChain Blog
Cyberwarzone
Cyberwarzone
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
C
CERT Recently Published Vulnerability Notes
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Security Latest
Security Latest
云风的 BLOG
云风的 BLOG
I
Intezer
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
MongoDB | Blog
MongoDB | Blog
aimingoo的专栏
aimingoo的专栏
K
Kaspersky official blog
Jina AI
Jina AI
N
News | PayPal Newsroom
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
MyScale Blog
MyScale Blog
IT之家
IT之家
Forbes - Security
Forbes - Security
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
T
Threat Research - Cisco Blogs
Y
Y Combinator Blog

博客园 - ant520

GNS3的使用2 SecureCRT 应用 sql 2000 修复问题 GNS3的使用 虚拟机-文件 无法显示隐藏文件的解决方法 看QQ是否在线 百度地图指南 sql 知识摘录 配置静态路由使用出站接口和下一跳IP的差别 如何计算冲突域和广播域-图解分析 240多个jQuery插件 C#中使用SQLite数据库 Visual studio 配置文件下载 SQL2000 安装,挂起 在口上打对钩√ DataTab转换XML XML转换DataTable 的类[转] excel 2003系列 全角转半角与半角转全角
委托/事件
ant520 · 2011-04-07 · via 博客园 - ant520
public class Program
 {
       delegate void CallFunction(object para);//定义委托[和定义方法一个样,简单理解为static 换成了delegate]
       private static event CallFunction CallEvenHandle;//定义事件[简单理解,有事件必有委托]
        static void Main(string[] args)
        {
            //调用委托,之前定义像方法,这里new了一个实例,和js的new一个function 差不多
           CallFunction cf = new CallFunction(WritePara);
            cf.Invoke("goodmorning");

         //调用事件,打上"+="后按"Tab"键就出来了,简单使用 
         CallEvenHandle += new CallFunction(WritePara);
            CallEvenHandle("CYQ");

            //Console.Read();
        }

        protected static void WritePara(object para)
        {
            Console.WriteLine("hello:"+para);
        }
    }

摘要:http://www.cnblogs.com/cyq1162/archive/2008/04/16/1155811.html