What’s new in C# 6.0 language?

C# 6.0 is an another version of C# programming language released in the year 2015. C# 6 provides numerous new features which helps developer to write C# code in more clean and optimized way. Here are top 8 features of C# 6.0 language No major concepts introduced in C# 6.0. Mainly small features have been added … Read more

State Management in C#

In my other blogs, you may read C# 6.0 new featuresIn this blog, I will explore about State Management in C#. If you have attended an interview as a C#.Net developer, then questions related to State Management is likely to be asked. You may read Important C# interview questions and answers What is State Management … Read more

What is collection in C#

Collection classes are used to store data of specific types. All types of collection support IEnumerable interface. Below are collection classes used in C#.net, all classes come under System.Collection namespace. List – An array does not allow dynamic resize, but a list allows dynamic size. Example: List<int> list = new List<int>(); list.Add(1); list.Add(5); list.Add(7); list.Add(10); … Read more

What is Nullable types in C#

What is nullable type in C# code? Please explain with an example. Nullable types were introduced in C# 2.0.Nullable types are instances of the System.Nullable<T> struct. A nullable type can represent the range of values for its underlying data type, also an additional null value. For example, a Nullable<Int32>, pronounced “Nullable of Int32,” can be … Read more

Bulk copy data from excel sheet to sql table

How to process bulk copy data from excel sheet to sql table. Here is code to copy data from excel to sql.       C# Code:       string excelFile = @”C:Book1.xls”;        string ssqlTable = “[MyTableName]”;        string exceldataQuery = “select [id],[email],[status] from [Sheet1$]”;        try    … Read more