Did you know… How to create an Object ID to keep track of your objects? – #314

Whenever you open a DataTip for an instance of an object, you’ll see the Make Object ID item in the context menu.

Make Object ID command in DataTip context menu

If you click on Make Object ID, you’ll see {1#} get added to the contents of the variable.

str "one" instance made into Object ID #1

and it will also show up in the Watch, Autos or Locals windows.

"one" {1#} as Value in Autos window

Then if you need to look at this object again, you can just refer to its Object ID as shown below in the Watch window.

1# as Name in Watch window

And when you’re done looking at the {1#}, you can Delete Object ID from the context menu, either in the Watch (autos or locals) or from the DataTip.

Delete Object ID

Technorati Tags: VS2005Tip,VS2008Tip

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>