ProjectItem.Kind Property
Gets a GUID string indicating the kind or type of the object.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
ReadOnly Property Kind As String
'Usage
Dim instance As ProjectItem
Dim value As String
value = instance.Kind
string Kind { get; }
property String^ Kind {
String^ get ();
}
function get Kind () : String
Property Value
Type: System.String
A GUID string representing the type of object.
Remarks
If you are providing a new type of project item, you must provide a unique GUID string to identify it, and make this information available in your tool, type library, or documentation.
Examples
[Visual Basic]
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);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Other Resources
How to: Compile and Run the Automation Object Model Code Examples