Tsallaka zuwa abun ciki
Justice Tech School

static Members

static members belong to the type, not to objects.

Example
new Counter(); new Counter();
Console.WriteLine(Counter.Count);

class Counter
{
    public static int Count;
    public Counter() { Count++; }
}

Exercise

Type level member.

public  int n;

Quiz Test

Where does static live?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.