Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ConfigurationManager.ConfigurationRowNames Property

Gets an array of all defined configuration names for the project or project item.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Object ConfigurationRowNames { get; }

Property Value

Type: System.Object
An array of all defined configuration names for the project or project item.

public void CodeExample(DTE2 dte, AddIn addin)
{   // Make sure you have a solution loaded into Visual Studio
    // before running the following example.
    try
    {
        ConfigurationManager configmgr;
        Array arrayCRN;
        if (dte.Solution.Projects.Count > 0)
        {
            configmgr = dte.Solution.Projects.Item(1).ConfigurationManager;
            // Show all defined configuration names for the parent 
            // object of this Configuration Manager.
            arrayCRN = (Array)configmgr.ConfigurationRowNames;
            string cfnames = "Configuration Row Names: \n";
            foreach (string n in arrayCRN)
                cfnames = cfnames + n + "\n";
            MessageBox.Show(cfnames);
        }
    }
    catch(Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

Show:
© 2015 Microsoft