Stack References
#include "stdafx.h" using namespace System; ref class Square { public: int Area() { return d * d; } int d; }; void main() { Square ^sqr1 = gcnew Square(); sqr1->d = 2; Console::WriteLine( sqr1->Area() ); Square sqr2; sqr2.d = 3; Console::WriteLine( sqr2.Area() ); }