Addressing a variable in VB
Posted
by
Jeff
on Programmers
See other posts from Programmers
or by Jeff
Published on 2011-02-18T16:49:58Z
Indexed on
2011/02/18
23:33 UTC
Read the original article
Hit count: 463
Why doesn't Visual Basic.NET have the addressof operator like C#? In C#, one can
int i = 123;
int* addr = &i;
But VB has no equivalent counter part. It seems like it should be important.
UPDATE Since there's some interest, Im copying my response to Strilanc below.
The case I ran into didnt necessitate pointers by any means, but I was trying to trouble shoot a unit test that was failing and there was some confusion over whether or not an object being used at one point in the stack was the same object as an object several methods away.
© Programmers or respective owner