02 2012 档案
摘要: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...
阅读全文
摘要:委托的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 = ...
阅读全文