"pointers" in /clr



In the 'old days', we could create a pointer to an instance of a variable
like so:

int i = 58 ;
int* i_ptr = &i ;
int j = *i_ptr ; // j = 58

Now, in /clr how do we do the same? That is, if I replace '*' with '^' what
do I replace '&' with to generate a 'pointer' (is 'x^' called a 'reference'
per chance?) to the instance? That is:

ref class myClass() {...} ;

myClass i ;
myClass^ i_ptr = &i ; // error, use what instead of '&'?
myClass j = *i_ptr ; // error (i think), do what instead?

[==P==]




.


Loading