The individual times recorded can't mean much. Besides the Append and the ToString methods, they could be affected by things going on in the framework (garbage collecting) and in the system (other processes). To measure how long it takes to append stuff to a textbox (assuming that's what you want to do) I would take an average like this:
BBCode:Dim sw as StopWatch = StopWatch.Startnew For i as integer = 0 to 1000 TextBox1.AppendText("SomeText" & vbCrLf) Next Console.WriteLine((sw.ElapsedMilliseconds / 1000).ToString("0.00"))




Reply With Quote