OutputGroup.DisplayName 屬性
取得使用者介面中用於此輸出群組的名稱。
命名空間: EnvDTE
組件: EnvDTE (在 EnvDTE.dll 中)
語法
'宣告
ReadOnly Default Property DisplayName As String
string this { get; }
property String^ default {
String^ get ();
}
abstract DisplayName : string with get
function get DisplayName () : String
屬性值
類型:String
字串,表示這個輸出群組在使用者介面中所使用的名稱。
備註
DisplayName 傳回環境中所顯示的輸出群組名稱。
範例
Sub DisplayNameExample(ByVal dte As DTE2)
' Before running this example, open a project.
Dim proj As Project = dte.Solution.Projects.Item(1)
Dim groups As OutputGroups = _
proj.ConfigurationManager.ActiveConfiguration.OutputGroups
Dim group As OutputGroup
Dim msg As String = proj.Name & _
" has the following output groups:" & vbCrLf & vbCrLf
For Each group In groups
msg &= " " & group.DisplayName & vbCrLf
Next
MsgBox(msg)
End Sub
public void DisplayNameExample(DTE2 dte)
{
// Before running this example, open a project.
Project proj = dte.Solution.Projects.Item(1);
OutputGroups groups =
proj.ConfigurationManager.ActiveConfiguration.OutputGroups;
string msg = proj.Name + " has the following output groups:\n\n";
foreach (OutputGroup group in groups)
msg += " " + group.DisplayName + "\n";
MessageBox.Show(msg);
}
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。