Tag | Snippet Posts

This code snippet extends the functionality found in prop code snippet. It will populate the backing field in the property, check for equality in the setter and call PropertyChanged. It assumes you have a base class that handles the implementation of INotifyPropertyChanged. When the snippet is called, it will generate code that looks like this: private int myVar; public int MyProperty { get { return myVar; } set { if (!myVar.Equals(value)) { myVar = value; base.OnPropertyChanged("MyP... } ...
Hey guys, Here we are, and I’m taking the time to finish up my first series at my new host geekswithblogs! For this part of the series we’ll be taking a look at a practical example of an XML snippet, namely the snippet to create snippets. I’ve created my own version, but if you’ve toyed with XML snippets before you would know that Microsoft has already included a snippet snippet. This is a good alternative to the “Hard” way described in Part 1, but what if you want a little more of a custom feel ...
New developers often ask me about C# delegate, as they got a bit confused about the basic concept and specially maximum of the reference contains and discussed from an advanced view. Well I think delegate is really simple, when you grab it's basic idea. So what is delegate? Basically it is similar like the old "C" age function pointer, where functions can be assigned like a variable and called in the run time based on dynamic conditions. C# delegate is the smarter version of function pointer which ...