[C#] I wish I knew : RealProxy

I've been a professional C# developer for years now, but I'm still discovering trivial stuffs. In "I wish I knew", I describe a feature that I missed. The Gang Of Four defined a lot of design patterns. Among them is one that I use quite often: the Proxy pattern. For…

READ MORE

[C#] I wish I knew : catch unhandled exceptions

I've been a professional C# developer for years now, but I'm still discovering trivial stuffs. In "I wish I knew", I describe a feature that I missed. Here is a very common pattern: I'm writing an application and I want a custom dialog box to appear in case an unhandled…

READ MORE

[C#] I wish I knew : Nullable<T>.GetDefaultValue(T)

I've been a professional C# developer for years now, but I'm still discovering trivial stuffs. In "I wish I knew", I describe a feature that I missed. Given the following: struct T {} T? nullable; T fallback; I always though the only alternative to this: T value = nullable.HasValue ? nullable.Value…

READ MORE