using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 多线程_委托
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
//3.2在窗体加载的时候用‘写的方法DoShoumsgintextbox()’来实例化委托
Control.CheckForIllegalCrossThreadCalls = false;
dgshoumsgintextbox = new DGDoshoumsgintextbox(DoShoumsgintextbox);
DGaddtext dgaddtext = new DGaddtext(Addtext);
}
//4要调用的方法
private void AddString()
{
DateTime beginTime = DateTime.Now;
for (int i = 0; i