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 ww  .jav a 2 s .com*/
{
    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