Project.Kind 屬性
更新:2007 年 11 月
取得指示物件種類或型別的 GUID 字串。
命名空間: EnvDTE
組件: EnvDTE (在 EnvDTE.dll 中)
語法
ReadOnly Property Kind As String
Dim instance As Project
Dim value As String
value = instance.Kind
string Kind { get; }
property String^ Kind {
String^ get ();
}
function get Kind () : String
屬性值
表示物件型別的 GUID 字串。
備註
環境擴充功能必須提供唯一定義的型別字串。這項資訊應可在每項工具、語言的型別程式庫 (Type-Library) 或文件中取得。
範例
Sub KindExample2(ByVal dte As DTE2)
' Before running this example, open a project.
Dim proj As Project = dte.Solution.Projects.Item(1)
Dim item As ProjectItem
Dim msg As String
For Each item In proj.ProjectItems
msg &= " " & item.Name & _
" [Kind = " & item.Kind & "]" & vbCrLf
Next
MsgBox(proj.Name & " [Kind = " & proj.Kind & _
"] has the following project items:" & vbCrLf & vbCrLf & msg)
End Sub
public void KindExample2(DTE2 dte)
{
// Before running this example, open a project.
Project proj = dte.Solution.Projects.Item(1);
string msg = "";
foreach (ProjectItem item in proj.ProjectItems)
msg += " " + item.Name + " [Kind = " + item.Kind + "]\n";
MessageBox.Show(proj.Name + " [Kind = " + proj.Kind +
"] has the following project items:\n\n" + msg);
}
使用權限
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。