“StaticFieldInGenericType” (Problem)
What will the following code display?
class Foo<T>
{
public static int Bar;
}
void Main()
{
Foo<int>.Bar++;
Console.WriteLine(Foo<double>.Bar);
}
Last updated
Was this helpful?
What will the following code display?
class Foo<T>
{
public static int Bar;
}
void Main()
{
Foo<int>.Bar++;
Console.WriteLine(Foo<double>.Bar);
}
Last updated
Was this helpful?