OutputGroup.CanonicalName 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取用于此输出组的唯一名称。
public:
property System::String ^ CanonicalName { System::String ^ get(); };
public:
property Platform::String ^ CanonicalName { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(5)]
public string CanonicalName { [System.Runtime.InteropServices.DispId(5)] get; }
[<System.Runtime.InteropServices.DispId(5)>]
[<get: System.Runtime.InteropServices.DispId(5)>]
member this.CanonicalName : string
Public ReadOnly Property CanonicalName As 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);
}