c# 最简单的委托

来源:互联网 发布:淘宝开店托管充值软件 编辑:程序博客网 时间:2024/05/14 10:09
this.Invoke(new Action(() =>
{
    //这里面写需要进行的委托操作
    //比如线程操作界面的语句等
}));




//举例
this.Invoke(new Action(() =>
{
    this.TextBox1.Text = "12345";
}));


//举例
this.Invoke(new Action(() =>
{
    this.ListBox1.SelectedIndex = 0;
}));
0 0
原创粉丝点击