CSharp - Static Data in Generic Types

Introduction

Static data is unique for each closed type:

Demo

using System;

class Test<T>
{
    public static int Count;
}

class Test//from   w w w . ja v a  2 s .c o  m
{
    static void Main()
    {
        Console.WriteLine(++Test<int>.Count);     // 1
        Console.WriteLine(++Test<int>.Count);     // 2
        Console.WriteLine(++Test<string>.Count);  // 1
        Console.WriteLine(++Test<object>.Count);  // 1
    }
}

Result