Any good site or explanation on what is a ref class
and when to declare a class to be a "ref class"?
The explanation on msdn wasn't enough for me,
base_type(optional)
A base type. A ref class or ref struct can inherit from zero or more managed interfaces and zero or one ref types. A value class or value struct can only inherit from zero or more managed interfaces.
ref
The
ref
keyword tells the compiler that the class or structure will be allocated on the heap and a reference to it will be passed to functions or stored in class members. Thevalue
keyword tells the compiler that all of the data in the class or structure is passed to functions or stored in members.