Perhaps you are thinking of C ++ / CLI, which, unlike C #, allows the user to declare a "value class" or "ref class". In C #, any class that you declare will be an implicit reference class - only built-in types, structures, and enumerations have semantics of values. To read the value class in C ++ / CLI, look here: http://www.ddj.com/cpp/184401955
Value classes have very little functionality compared to ref classes and are useful for "plain old data"; that is, data that does not have an identity. Since you copy data when assigned to each other, the system provides you with a default copy constructor (and a must) that simply copies the data to another object.
To convert a value class to a reference class (thereby putting it in a heap of garbage), you can "paste" it.
To decide whether the class you are writing is one or the other, ask yourself if it has a personality. This usually means that it has a certain state or has an identifier or name, or the concept of its own context (for example, a node pointing to neighboring nodes).
If it is not, then this is probably a class of values.
However, in C # value classes are declared as "structures".
Drew hoskins
source share