OutputGroup.CanonicalName 属性
获取用于此输出组的唯一名称。
命名空间: EnvDTE
程序集: EnvDTE(在 EnvDTE.dll 中)
语法
声明
ReadOnly Property CanonicalName As String
string CanonicalName { get; }
property String^ CanonicalName {
String^ get ();
}
abstract CanonicalName : string with get
function get CanonicalName () : String
属性值
类型:String
一个字符串,表示用于此输出组的名称。
示例
Sub CanonicalNameExample(ByVal dte As DTE2)
' Before running this example, open a project.
' Display the output groups of the first project.
Dim proj As Project = dte.Solution.Item(1)
Dim con As Configuration = _
proj.ConfigurationManager.ActiveConfiguration
Dim names As String = ""
Dim og As OutputGroup
For Each og In con.OutputGroups
names &= og.CanonicalName & vbCrLf
Next
MsgBox(proj.Name & "'s " & con.ConfigurationName & _
" output groups:" & vbCrLf & vbCrLf & names)
End Sub
public void CanonicalNameExample(DTE2 dte)
{
// Before running this example, open a project.
// Display the output groups of the first project.
Project proj = dte.Solution.Item(1);
Configuration con = proj.ConfigurationManager.ActiveConfiguration;
string names = "";
foreach (OutputGroup og in con.OutputGroups)
{
names += og.CanonicalName + Environment.NewLine;
}
MessageBox.Show(proj.Name + "'s " + con.ConfigurationName +
" output groups:" + Environment.NewLine + Environment.NewLine +
names);
}
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。