#include "stdafx.h"
using namespace System;
generic
ref class GenericClass
{
T t;
public:
GenericClass() {}
property T InnerValue
{
T get() { return t; }
void set(T value) { t = value; }
}
};
int main()
{
double d = 0.01;
int n = 12;
GenericClass^ r_double = gcnew GenericClass();
GenericClass^ r_int = gcnew GenericClass();
r_double->InnerValue = d;
r_int->InnerValue = n;
Console::WriteLine( r_double->InnerValue );
Console::WriteLine( r_int->InnerValue );
}