Browse by Tags
All Tags »
Advices (
RSS)
A couple of days ago I hit a regression bug in .NET 3.5 SP1, in which when you have a generic class that implements ISerializable and has static variables – you can not serialize it using a BinaryFormatter without your application either hanging (x86...
It’s been a few months since I started getting acquainted with the System.DateTimeOffset type and I can honestly say I don’t see any reason to use System.DateTime anymore. I’ve even gone as far as ask whether anyone knew when I would rather use DateTime...
After a couple of days of trying to run a load test for a web service on several agents via Visual Studio 2008, I come out much wiser and with a few new bald-spots, where hair I pulled out in the process used to be. I got a few errors whose messages have...
When using LINQ, queries may bloat up to dozens of lines. My personal style is to take these queries and break them apart to smaller units of logic. To each unit of logic, I append a call to ToArray . @yosit asked me why I did it and I answered I was...
Tamir hates lambdas. He was having a problem with one of his lambda expressions and twittered about it. Around that time I opened my twitter account (yes, Yosi finally convinced me) and offered my help. He wanted to have a single extension method that...
Got an exception being thrown with only its name being displayed in the output window? Want to catch that exception? Just click on Debug -> Exceptions (Ctrl D, E) and check the exception you want to catch whenever it's thrown: Now the debugger will...
I just finished a short conversation with Aaron Randall from London who used the little Windows Live Messenger Flash application in my sidebar (oh, how I love thee, Internets) to ask me a question he had about linked lists after reading one of my posts...
DO NOT return null values from collection properties or from methods returning collections. Return an empty collection or an empty array instead. Users of collection properties often assume that the following code will always work: IEnumerable < string...
A little known, as far as I can tell from asking around, yet extremely useful property in the Windows Forms designer's property grid is GenerateMember . Defaulting to true , it decides whether a control/component gets declared as a field on the form ...
A colleague was baffled by having Control.Invoke (when called from a different thread) throw an ArgumentException at him and asked if I knew what was happening. Opening the stack trace, I found that the exception originated from Control.MarshaledInvoke...
More Posts
Next page »