Share via


Project.Kind-Eigenschaft

Ruft eine GUID-Zeichenfolge ab, die die Art bzw. den Typ des Objekts beschreibt.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
ReadOnly Property Kind As String
string Kind { get; }
property String^ Kind {
    String^ get ();
}
abstract Kind : string
function get Kind () : String

Eigenschaftswert

Typ: System.String
Eine GUID-Zeichenfolge, die den Objekttyp darstellt.

Hinweise

Integrierte Projekttypen werden in PrjKind definiert.Umgebungserweiterungen müssen eindeutig definierte Typenzeichenfolgen bereitstellen.Diese Informationen sollten in jedem Tool, jeder Typbibliothek jeder Sprache und in jeder Dokumentation verfügbar sein.

Beispiele

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-Sicherheit

Siehe auch

Referenz

Project Schnittstelle

EnvDTE-Namespace

Weitere Ressourcen

Gewusst wie: Kompilieren und Ausführen der Codebeispiele für das Automatisierungsobjektmodell