Determining address of value type variables

  • Thread starter Thread starter Raj
  • Start date Start date
R

Raj

How to get the address of(memory location) value type variables?

GetHashCode() returns only value and not its address

Thank you

Regards
Raj
 
Raj said:
How to get the address of(memory location) value type variables?

GetHashCode() returns only value and not its address

Thank you

Regards
Raj


An address in memory and a hashcode have nothing to do with each other.

You should rarely, if ever, need to get an address of any .net object.

To get an address in memory, you need to use unsafe code and the "&" operator.

Mike
 
Back
Top