blob: 7154e186e73e8a47a3d3a187dfb2baea4b76c064 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using System;
using System.ComponentModel;
using System.Web.UI.WebControls;
class Test {
static void DoTest () {
for (int i=0; i<100000; i++) {
TextBox tb = new TextBox ();
TypeDescriptor.GetProperties (tb);
tb.Dispose ();
}
}
static void Main(string[] args) {
Console.WriteLine ("This test should normally take less than a second");
DateTime start = DateTime.Now;
DoTest ();
TimeSpan ts = DateTime.Now - start;
Console.Write ("Time spent: ");
Console.WriteLine (ts.ToString());
}
}
|