Posts tagged C#

Easy creation of code generators in Visual Studio 2008 (part 2 of 4)

In the first part I’ve written about creating a code generator in VS2008 to eliminate repetitive coding.
The series is divided into four parts:
Part I  – creating a Visual Studio Package
Part II (this one) – creating and registering a code generator
Part III – generating code & debugging
Part IV – creating the setup project and deploying the [...]

Creating a type-safe implementation of the INotifyPropertyChanged interface

When working with Silverlight two-way binding (and not only there) you need to implement the INotifyPropertyChanged interface in order to notify any observers that the property values of the object have changed.

Some useful extension methods

The class at the end of this post contains some extension methods that I commonly use in my code:

IDictionary<TKey, TValue>.GetValueOrDefault
IEnumerable<T>.ToHashSet
IEnumerable<T>.ToJoinedString

WordPress SEO fine-tune by Meta SEO Pack from Poradnik Webmastera