C#

Free ebook on commenting

Stumbled across ic#code‘s free ebook ‘The fine art of commenting’ this morning, it’s from 2002 but everything still applies, you can download it here. The book covers commenting in general and not just C#, but in relation to C# here’s the list of the predefined xml tags you can use in comments (something I have …

Free ebook on commenting Read More »

Extension methods to sum IEnumerable(ulong) and IEnumerable(ulong?)

Ever tried to use IEnumerable<T>.Sum on an array of unsigned long integers? Well, you can’t, because the Sum method has not been implemented for ulong or ulong?, so to fill in the gap here’s the extension methods you need using more or less the same code as the existing Sum methods: I used some custom …

Extension methods to sum IEnumerable(ulong) and IEnumerable(ulong?) Read More »

.Net Tips – How to determine if a type implements a generic interface type

When you have a generic interface such as: It’s easy to check whether a given instance implements the IInitializable interface with a specific T: But what if you want to find out if a type implements the IInitializable interface of an arbitrary T? You won’t be able to simply get away with this: Instead, you …

.Net Tips – How to determine if a type implements a generic interface type 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