[responsive-menu menu="HamburgerMenu"]

Disposable pattern

There are hundred of ways to implement the Disposable pattern in C#. The official one (here) is nice, but a bit confusing with all those Booleans. After reading some articles, and talking to fellow developers, I made mine : public class MyDisposableClass : IDisposable { ~MyDisposableClass() { ReleaseUnmanagedResources(); } [...]

Rx Reactive Framework 101 (Part III)

In this third article, I’ll talk about making your own observable and observer classes. (You need to install Rx Extension v1.0.10621 and add a reference to System.Reactive) It is quite easy, you just have to make your class implement iObservable. The only method the interface has is : IDisposable Subscribe(iObserver observer) So, we need to implement [...]

Out and Ref

A classic question when starting in C# is : what is the difference between Ref and Out for method parameters? What is the usage? Both pass the parameter by reference, but there are two subtle differences : · A Ref parameter must be initialized before it is passed to the method. It is not the case with Out. · Any Out parameter must be assigned in the [...]