We are familiar with the concept of multithreading. For winform developers. A lot of resources are used. however, Timer or backgroundWorker is used. have you ever thought about writing a base class and then .... it can be used immediately when multithreading is used. yes, welfare is coming. I wrote a base class for multithreading for everyone. only you use multithreading, the following Code will certainly help you a lot to View Code 1. from the constructor, a definite list is processed. yes. this multi-thread can only process the identified list. Will you ask. can I add and process them at the same time? (Oh, yes. Please contact the landlord. Of course you can write it yourself, right ?!) Public QueueThreadBase (IEnumerable <T> collection) 2. the Undo function is provided /// <summary> /// Cancel = True /// </summary> public bool Cancel {get; set;} 3. modify the number of threads /// <summary> /// Number of threads /// </summary> public int ThreadCount {get {return this. m_ThreadCount;} set {this. m_ThreadCount = value;} 4. provides a variety of event responses, such as a single completed event, all completed events /// <summary> // all completed events /// </summary> public event Action <CompetedEventArgs> AllCompleted; /// <summary> /// single completion event /// </summary> public event Action <T, CompetedEventArgs> OneCompleted; 5. provided completion percentage // <summary> // completion event data // </summary> public class CompetedEventArgs: EventArgs {public CompetedEventArgs () {}/// <summary> /// completion percentage /// </summary> public int CompetedPrecent {get; set ;} /// <summary> // Exception information // </summary> public Exception InnerException {get; set ;}} 6. the thread termination method is provided, continue/terminate a single thread/terminate all // <summary> // dowork result enumeration // </summary> public enum DoWorkResult {// <summary> /// continue running, default /// </summary> ContinueThread = 0, /// <summary> /// terminate the current thread /// </summary> AbortCurrentThread = 1, /// <summary> // terminate all threads /// </summary> AbortAllThread = 2}