Saturday, 5 September 2015

static in c#.net

Static
static is a keyword that behaves like type modifier.
static works again oop and beyond the oops.
static member are guest for a class.
A static variable created only once in complete program whenever
class is invoked only when application is closed.
Example:-
class class1
{
public int a,b;
public static int c;
public static int count=0;
public class1()
{
count++
message box.show("convert.To string")
}






class1 ob1=new class();
class1.c=25;

No comments:

Post a Comment