/* ------------------------ My Meta Content Here SEO ------------------------ */

Pages

Main Menu

Saturday, May 11, 2019

What is the use of static variable in C#? When to use it? Why can't I declare the static variable inside method?

Static variable in C#? static variable value is shared among all instances of that class. A static variable shares the value of it among all instances of the class. Example without declaring it static: public class Variable { public int i = 5; public void test() { i = i + 5; Console.WriteLine(i); } } public class Exercise { static void Main() { Variable var = new Variable(); var.test(); Variable var1...
Read More »

Saturday, May 4, 2019

ADO.NET

How to Create and Execute SqlCommand in ADO.NET Technologies ADO.NET, Data Access, .NET Development Topics Stored Procedures, sql commond How to Create and Execute SqlCommand in ADO.NET Introduction We can create and execute different types of SqlCommand. In this applilcation, we will demonstrate how to create and execute SqlCommand: 1. Create different types of SqlCommand; 2. Execute...
Read More »

My Blog List