jecjackal
jecjackal

Reputation: 1437

Visual Studio, See variable's memory address in watch window

One particular feature I'm used to having in a watch window is a variable's memory address. IIRC Visual Studio does this for C++ (I know QtCreator/Eclipse do). Is there a simple way I can do this in Visual Studio for a C# program?

Any help will be appreciated. Thank you,

Jec

Upvotes: 24

Views: 31808

Answers (1)

Habib
Habib

Reputation: 223217

Put a debug point, Start your application, when that debug point is hit, Go to Debug -> Windows -> Memory enter image description here

There in Address textbox type, the name of variable, and you will be able to see the address.

Short-cut key in Visual Studio 2012 appears as CTRL+ALT+M, 1

Upvotes: 33

Related Questions