Tag Archives: C#

How to implement Event Accessors and Single Handler Events

By | October 9, 2013

Event accessor is not new concept. It has been part of C# language from its inception. If you have ever built a class which has an Event with it, you might have already used it. The .NET automatically adds one Event Accessor inside the event when you define one without it. Unlike VB.NET, the event accessor does not… Read More »

Conditional Compilation with Precompiler Directives in C#

By | October 8, 2013

Coming from C or C++, C# has always the flexibility to handle directives. The directives are well known in those languages, but most of the developers don’t know that these things still exists in C#. There are few pre-processor directives available on C# which help you to define a constant which is replaced during compile time, or even… Read More »

Console.WriteLine or ‘cw’ – Which one do you prefer ?

By | September 16, 2013

Few days back we have discussed about some of the hidden and very useful code snippet of visual studio, ‘propfull – for property and backing field’ and ‘forr’ code snippet for reverse ‘for’ loop.  Many of you have found them very useful and thanks for sharing the feedback. Today you will learn another interesting code snippet, called‘cw’.

Using or Using ?

By | September 6, 2013

The title of this post is confusing enough! Really ? nevertheless to say, you are smart enough to guess on what we are going to talk about. One of the frequent question that comes in the .NET interview is “What is the difference between Using Directives and Using Statement ?” Sometimes the interviewers puts some extra trap by asking… Read More »

Asynchrony with Dispatcher in WPF

By | September 3, 2013

The new addition of async and await have already created buzz in the city with the superior language support of calling asynchronous code that looks pretty synchronous. There are two keywords that has been introduced to handle this behavior. The async is a specifier which directs the compiler to orchestrate automatically during the compilation to change its behavior… Read More »