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...
This blog related to all the experience that i gain and face during past career. It covers Microsoft technology like. Microsoft Dot Net, SQL Server, Scripting Language etc,.
Pages
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?
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...
Subscribe to:
Posts (Atom)
My Blog List
-
-
-
-
Kumaon University Nainital B.Ed entrance exam test result 2012 - कुमाऊँ विश्वविधालय, नैनीताल (उत्तराखण्ड)11 years ago