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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top