properties within Templates

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

this seems ok:

template<class T> ref class MyTemplateClass
{
String^ get_Name() { return nullptr; }; void set_Name( String^ ) {};
//...
};

but this throws an error

template<class T> ref class MyTemplateClass
{
property String^ Name { String^ get() { return nullptr; }; void set( String^
) {}; }
//...
};

"error C2814: 'MyTemplateClass<T>::Name' defined inside
'MyTemplateClass<T>', nested type must be a value class, ref class or
interface class"

are properties not allowed/recognized inside of templates?
 
already got the compiler tools update from the first reply (where did this
post go?)
and it works

but thank you anyway
 
Back
Top