private static void WriteAddresses() { const string addressFormatLine1 = "{0} Dickinson"; for (var i = 1; i <= 2000; i++) { var line1 = string.Format(addressFormatLine1, 300 + i); var tp = new ThreadParm { Line1 = line1 }; var t = new Thread(WriteAddress); t.Start(tp); } }
private static void WriteAddresses(AddressStorage instance) { const string addressFormatLine1 = "{0} Dickinson"; for (var i = 1; i < 2000; i++) { var line1 = string.Format(addressFormatLine1, 300 + i); var tp = new ThreadParm { Storage = instance, Line1 = line1 }; var t = new Thread(WriteAddress) { Name = $"Thread {i}" }; t.Start(tp); } }