1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
var hashTable = new Hashtable();
Dictionary<string, string> dico = new Dictionary<string, string>();
List<string> resultsHasTable = new List<string>();
System.Text.RegularExpressions.Regex searchTerm = new System.Text.RegularExpressions.Regex("11");
Stopwatch sw = Stopwatch.StartNew();
int oldR1 = 0;
try
{
for (int i = 0; i < 100000; i++)
{
int r1 = oldR1 + new Random().Next(1, 10);
int r2 = new Random().Next(0, r1);
oldR1 = r1;
hashTable.Add(r1.ToString(), r2.ToString());
dico.Add(r1.ToString(), r2.ToString());
}
}
catch (Exception ex)
{
ResultsTextBox.Text += "Ex : " + ex.Message;
}
sw.Stop();
ResultsTextBox.Text += "\nRemplissage : " + sw.Elapsed ; |
Partager