namespace WindowsFormsApp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
List<string> ary = new List<string>()
{
"tony",
"mary",
"c:"
};
string var = @"tony\sss\ee";
//ary.ForEach(x => x = var);
label1.Text = ary.FirstOrDefault(x => var.Contains(x));
}
bool flag = false;
private void _watch_Created(object sender, FileSystemEventArgs e)
{
先非同步過濾
下面放在非同步裡面
存入 Queue(e.FullPath);
if (!flag)
{
flag = true;
用非同步的方法 handleQueue();
}
}
public asyc void handleQueue()
{
//逐筆處理 Queue集合的東西
flag = flase;
}
}
}
沒有留言:
張貼留言