using System;
using System.Collections.Generic;
struct GenericStruct
{
private T _Data;
public GenericStruct(T value) {
_Data = value;
}
public T Data
{
get { return _Data; }
set { _Data = value; }
}
}
class MainClass
{
static void Main()
{
GenericStruct IntData = new GenericStruct(10);
GenericStruct StringData = new GenericStruct("str");
Console.WriteLine("IntData = {0}", IntData.Data);
Console.WriteLine("StringData = {0}", StringData.Data);
}
}
IntData = 10
StringData = str