Category: C#

How to Add item to the beginning of List in C# ?

If you want to add or insert an item to the beginning of the List in C# , you can use the Insert method defined in the collection as shown below. How to Add item to the beginning of List in C# ? using System; using System.Collections.Generic; using System.Linq; namespace ACCode {     class Program     {         static void Main(string[] args)         {            …

How to handle Null Column values of SQLDataReader in C# ?

If you want to handle the Null column values of the sqldatareader object in C#, you can use the SqlReader.IsDBNull method to validate for it. If the SqlReader.IsDBNull returns true then , the value is considered to be a null value and you can take the ction accordingly. How to handle Null Column values of SQLDataReader in C# ?