C#提供一种对集合的多线for循环:
System.Threading.Tasks.Parallel.ForEach<T>(List<T>,
new ParallelOptions { MaxDegreeOfParallelism = 5 },
(item) =>{//循环体});
ParallelOptions用于设置最大的并行数.
C#提供一种对集合的多线for循环:
System.Threading.Tasks.Parallel.ForEach<T>(List<T>,
new ParallelOptions { MaxDegreeOfParallelism = 5 },
(item) =>{//循环体});
ParallelOptions用于设置最大的并行数.
this.richTextBox2.SelectionStart=this.richTextBox2.Text.Length; this.richTextBox2.ScrollToCaret();
public partial class MyMessageBox : Window { public static void Show(string strErrorInfo) {