#include "stdafx.h"
using namespace System;
template
public ref class CTemplate
{
T m_obj;
public:
CTemplate(T obj) { m_obj = obj; }
property T InnerObject
{
T get() { return m_obj; }
void set(T obj) { m_obj = obj; }
}
};
int main(){
CTemplate^ ct_int;
CTemplate^ ct_string;
ct_int = gcnew CTemplate(55);
ct_string = gcnew CTemplate("test");
Console::WriteLine("{0} ", ct_int->InnerObject );
Console::WriteLine("{0} ", ct_string->InnerObject );
}