Expression.DataMembers Property

Definition

If the expression represents a class or a structure, this property gets a list of member variables as an Expressions collection.

C++
public:
 property EnvDTE::Expressions ^ DataMembers { EnvDTE::Expressions ^ get(); };

Property Value

An Expressions collection.

Attributes

Examples

The following example demonstrates how to use the DataMembers property.

C#
public static void DataMembers(DTE dte)  
{  
    // Setup debug Output window.  
    Window w = (Window)dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);  
    w.Visible = true;  
    OutputWindow ow = (OutputWindow)w.Object;  
    OutputWindowPane owp = ow.OutputWindowPanes.Add("DataMembers Property Test");  
    owp.Activate();  

    // "a" is an instance of class A.  
    EnvDTE.Expression exp1 = dte.Debugger.GetExpression("a", true, 1);  
    EnvDTE.Expressions exps = exp1.DataMembers;  
    foreach(EnvDTE.Expression exp in exps)  
        owp.OutputString(exp.Name + "\n");  
}  

Remarks

See Expressions in the Debugger for general information about expressions.

Applies to

Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022