Memory address of a variable

Posted by dotnetvoyager on Stack Overflow See other posts from Stack Overflow or by dotnetvoyager
Published on 2010-04-07T04:34:25Z Indexed on 2010/04/07 4:43 UTC
Read the original article Hit count: 261

Filed under:
|
|

Hi Everyone,

Is it possible to get the memory address of a variable in C#.

What I am trying to do is very simple. I want to declare variables of type Double, Float, Decimal and assign the value 1.1 to each of these variables. Then I would like to go and see how these values are represented in memory. I need to get the memory address of the variable in order to see how its stored in memory. Once I have the memory address I plan to put a break point in the code and use the Debug -> Windows -> Memory option in visual studio to see how the numbers are stored in memory.

Cheers,

© Stack Overflow or respective owner

Related posts about c#

Related posts about variables