ConfigurationManager.ConfigurationRowNames 属性

获取由项目或项目项的所有已定义配置名组成的数组。

命名空间:  EnvDTE
程序集:  EnvDTE(在 EnvDTE.dll 中)

语法

声明
ReadOnly Property ConfigurationRowNames As Object
Object ConfigurationRowNames { get; }
property Object^ ConfigurationRowNames {
    Object^ get ();
}
abstract ConfigurationRowNames : Object with get
function get ConfigurationRowNames () : Object

属性值

类型:Object
由项目或项目项的所有已定义配置名组成的数组。

示例

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);
    }
}

.NET Framework 安全性

请参阅

参考

ConfigurationManager 接口

EnvDTE 命名空间