February 2007 Entries

Unintentional Excessive Garbage Collection

When you want a high performance application, it pays to know what is happening behind the scenes in some of the most often used classes.

Posted On Monday, February 19, 2007 1:51 PM | Comments (1)

Reign in your web parameters

As web developers we are tempted to be general about our use or the request object and submitted parameters. The temptation to access Request[“someKey”] is high because it frees us from wondering whether MyPage.aspx was posted to using POST or GET and we might also convince ourselves that it’s more flexible because it means that both POST and GET would work. Well, it would do something, that’s for sure. But do we always get consistent results?

Posted On Monday, February 19, 2007 1:50 PM | Comments (2)

Generics - delegate and custom event args
When you want to create custom events, often you need to pass an event argument, and as often you need only to pass in one parameter - your object. So what you used to do is: public event MyCustomEventHandler MyCustomEvent; public delegate void MyCustomEventHandler(MyCust... evt); public class MyObject { public string foo; public int count; public DateTime when; public MyObject() { foo = "hello world"; count = 42; when = DateTime.Now; } public override string ToString() { return string.Format("{0}\t{1}\t{2... ......

Posted On Wednesday, February 14, 2007 3:29 PM | Comments (1)