Viewing a single comment thread. View all comments

Triabolical_ t1_ixjwabm wrote

> Is this even relevant to the situation either in c# having such qualifiers or in classes and structs being sufficiently similar for that to be feasible (if only everything had been different)?

C++ is pretty much that way; structs and classes are mostly the same thing and the developer chooses whether they want to allocate it on the stack or whether they want to put it in dynamic memory.

In C# - and managed languages in general - class instances are always allocated in dynamic memory. Structs were really just added for windows interop, though they do have other limited uses.

2