DirectoryEntry.NativeGuid DirectoryEntry.NativeGuid DirectoryEntry.NativeGuid DirectoryEntry.NativeGuid Property

定義

取得 DirectoryEntry 的 GUID,做為提供者傳回的值。Gets the GUID of the DirectoryEntry, as returned from the provider.

public:
 property System::String ^ NativeGuid { System::String ^ get(); };
[System.ComponentModel.Browsable(false)]
[System.DirectoryServices.DSDescription("DSNativeGuid")]
public string NativeGuid { get; }
member this.NativeGuid : string
Public ReadOnly Property NativeGuid As String

屬性值

Guid 結構,表示 DirectoryEntry 的 GUID,做為提供者傳回的值。A Guid structure that represents the GUID of the DirectoryEntry, as returned from the provider.

範例

下列範例示範Guid DirectoryEntry類別的和NativeGuid屬性。The following example demonstrates the Guid and NativeGuid properties of the DirectoryEntry class. 這個範例會取得使用者指定DirectoryEntry的,並顯示其NativeGuid Guid和屬性。This example gets the user-specified DirectoryEntry and displays its Guid and NativeGuid properties.

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);  

備註

系結NativeGuid Active Directory Domain Services 中的物件時,請使用屬性。Use the NativeGuid property when binding an object in Active Directory Domain Services.

注意

輕量型目錄存取協定(LDAP)提供者會傳回的全域唯一識別碼DirectoryEntry ,其格式與 Internet Information Services (IIS)、Novell NetWare 目錄服務器(NDS)和 WinNT 提供者不同。The Lightweight Directory Access Protocol (LDAP) provider returns the globally unique identifier of a DirectoryEntry in a different format than the Internet Information Services (IIS), Novell NetWare Directory Server (NDS), and WinNT providers.

適用於

另請參閱