C#

F# – helper functions to convert between Async<unit> and Task

With the official release of .Net 4.5 and Visual Studio 2012, I suspect many .Net developers will be rushing to rewrite their data access or network layers (amongst many many other things!) to take advantage of the new async-await (see the excellent 101 examples here) language feature in C#, which means you’ll likely be working …

F# – helper functions to convert between Async<unit> and Task Read More »

.Net Tips – use [field:NonSerialized] to stop serializing your event handlers

In C#, when you define an event in your class, e.g.: the event handlers will be serialized along with other properties, etc. This is because under the hood, the compiler translates your event into the following, as can be seen through JetBrain’s dotPeek decompiler: Since the generated EventHandler is not marked with the [NonSerialized] attribute …

.Net Tips – use [field:NonSerialized] to stop serializing your event handlers Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close