Lets say I have an int in one class. I want an int to another class that "points" to the int of the first class. In C++ I would use a pointer. In C# I should use a reference? Like:
Or is just Int32 another way to say int?Code:class A { public int a; } class B { public Int32 b = new Int32(); } A a = new A(); B b = new B(); a.a = 1; b.b = a.a; a.a = 12; // is b.b no 12 or 0?
Will this work? I suspect it wont...
What is the best way to do it if the above is wrong?