随笔分类 -  .NET

摘要:public partial class Form1 : Form { private string path; public Form1() { InitializeComponent(); System.IO.DirectoryInfo mDir = new System.IO.DirectoryInfo(System.Windows.Forms.Application.StartupPath); System.IO.DirectoryInfo dir = mDir.Paren... 阅读全文
posted @ 2012-02-23 14:05 徐新文 阅读(191) 评论(0) 推荐(0) 编辑
摘要:委托的Invoke方法用来进行同步调用。同步调用也可以叫阻塞调用,它将阻塞当前线程,然后执行调用,调用完毕后再继续向下进行。同步调用的例子:View Code using System;using System.Threading;public delegate int AddHandler(int a, int b);public class Foo { static void Main() { Console.WriteLine("**********SyncInvokeTest**************"); AddHandler handler = ... 阅读全文
posted @ 2012-02-21 11:29 徐新文 阅读(222) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示