ConfigurationManager.ConfigurationRowNames 屬性

取得專案或專案項目之所有已定義組態名稱的陣列。

命名空間:  EnvDTE
組件:  EnvDTE (在 EnvDTE.dll 中)

語法

'宣告
ReadOnly Property ConfigurationRowNames As Object
    Get
Object ConfigurationRowNames { get; }
property Object^ ConfigurationRowNames {
    Object^ get ();
}
abstract ConfigurationRowNames : Object
function get ConfigurationRowNames () : Object

屬性值

型別:System.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 命名空間