Can any one please provide a clear example of how can I implement this in my C# code?
Have a look at this article.