DirectoryEntry.Guid Eigenschaft

Definition

Ruft die GUID von DirectoryEntry ab.

public:
 property Guid Guid { Guid get(); };
public Guid Guid { get; }
[System.ComponentModel.Browsable(false)]
[System.DirectoryServices.DSDescription("DSGuid")]
public Guid Guid { get; }
member this.Guid : Guid
[<System.ComponentModel.Browsable(false)>]
[<System.DirectoryServices.DSDescription("DSGuid")>]
member this.Guid : Guid
Public ReadOnly Property Guid As Guid

Eigenschaftswert

Eine Guid-Struktur, die die GUID des DirectoryEntry darstellt.

Attribute

Beispiele

Im folgenden Beispiel werden die Guid Eigenschaften und NativeGuid der DirectoryEntry -Klasse veranschaulicht. In diesem Beispiel wird die vom Benutzer angegebene DirectoryEntry abgerufen und die Guid Eigenschaften und NativeGuid angezeigt.

Dim myADSPath As [String] = "LDAP://onecity/CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com"  
Dim myDirectoryEntry As New DirectoryEntry(myADSPath)  

' Display the Guid and NativeGuid.  
Console.WriteLine("The GUID of the ADS object:" + myDirectoryEntry.Guid.ToString)  
Console.WriteLine("The Native GUID of the ADS" + "object:" + myDirectoryEntry.NativeGuid)  
String myADSPath = "LDAP://onecity/CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com";  
DirectoryEntry myDirectoryEntry=new DirectoryEntry(myADSPath);  

// Display the Guid and NativeGuid.  
Console.WriteLine("The GUID of the ADS object:"+  
                  myDirectoryEntry.Guid);  
Console.WriteLine("The Native GUID of the ADS"+  
                  "object:"+myDirectoryEntry.NativeGuid);  
String^ myADSPath = "LDAP://onecity/CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com";  
DirectoryEntry^ myDirectoryEntry = gcnew DirectoryEntry(myADSPath);  

// Display the Guid and NativeGuid.  
Console::WriteLine("The GUID of the ADS object: {0}", myDirectoryEntry->Guid);  
Console::WriteLine("The Native GUID of the ADS object: {0}",  
                   myDirectoryEntry->NativeGuid);  

Hinweise

Verwenden Sie bei der Bindung an ein Objekt in Active Directory Domain Services die NativeGuid -Eigenschaft.

Gilt für:

Weitere Informationen