using System;
class Generic<T> where T: class
{
public T gVariable {
get;
set;
}
}
class Program
{
static void Main(string[] args)
{
// Generic<int> g = new Generic<int>();
// int is a value type
// error CS0452: The type `int' must be a reference type
Generic<string> g = new Generic<string>();
g.gVariable = "c#";
Console.WriteLine(g.gVariable);
}
}
/*
run:
c#
*/