ConfigurationManager.ConfigurationRowNames 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取项目或项目项的所有已定义配置名称的数组。
public:
property System::Object ^ ConfigurationRowNames { System::Object ^ get(); };
public:
property Platform::Object ^ ConfigurationRowNames { Platform::Object ^ get(); };
[System.Runtime.InteropServices.DispId(7)]
public object ConfigurationRowNames { [System.Runtime.InteropServices.DispId(7)] get; }
[<System.Runtime.InteropServices.DispId(7)>]
[<get: System.Runtime.InteropServices.DispId(7)>]
member this.ConfigurationRowNames : obj
Public ReadOnly Property ConfigurationRowNames As 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);
}
}