Search code examples
c#visual-studiovsxenvdtevs-extensibility

EnvDTE.Expression - Getting the internal name of DataMembers programmatically


Supposing I have the C# code line:

var myList = new List {1,2,3};

And I put "myList" in the Watch window, and then drag the 1st item of the list down, the watch window creates a new line with the internal name of this data member, which in this case would be

(new System.Collections.Generic.Mscorlib_CollectionDebugView(myList)).Items[0]

My question is, is there a way to programmatically get this internal name from an EnvDTE's Expression's DataMember?

Thanks a lot!


Solution

  • No, you just can't. You have to roll your own.