DataReader Extension to map DataReader with object or list of objects
Posted By : Manish Banga at 19 March 2015
Updated On : 19 March 2015
While reading data from DataReader, many times we need to map that data either in a single object or list of objects. We generally do it manually by reading data index wise or column name wise and set in properties of object(s). If there is any change in backend result set (add/delete column), we will have to manually fix it in code. Here I have created a DataReader Extension to solve this issue and make mapping easy.
Lambda expression is one of the features introduced in the C# 3.0. Lambda expression helps you to ease the burden of writing verbose Anonymous Methods. It is a new way to write anonymous method. Actually during compile time all lambda expressions are converted in anonymous method.
Abstract Class vs Interface - Real time scenarios to decide when to use abstract class and when to use interface.
Posted By : Manish Banga at 24 January 2016
Updated On : 24 January 2016
The concept of Abstract classes and Interfaces is a bit confusing for beginners of Object Oriented programming. In this article I will describe what is the main difference between interface and abstract class? And what could be the real time scenarios to use abstract class and interface?
int.Parse() vs Convert.ToInt32() vs int.TryParse()
Posted By : Manish Banga at 27 April 2016
Updated On : 27 April 2016
This is one of the frequently asked C# interview question for the beginners. In this article I will explain differences among int.Parse(), Convert.ToInt32() and int.TryParse(). I will also describe that in which case which one should be used.
This is one of the frequently asked C# interview question for the beginners. Constant, ReadOnly and Static are keywords that are nearly the same in behavior but confusing. In this article I will explain differences among const, readonly and static keywords. You will be able to understand their different behavior and operation.
This is one of the frequently asked C# interview question for the beginners. This is very simple but confusing question during interview. In this article I will explain difference between string and System.String in C#.