DirectoryEntry.Guid プロパティ
アセンブリ: System.DirectoryServices (system.directoryservices.dll 内)



DirectoryEntry クラスの Guid プロパティと NativeGuid プロパティの例を次に示します。この例は、ユーザーが指定した DirectoryEntry を取得し、その Guid プロパティと NativeGuid プロパティを表示します。
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);

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- DirectoryEntry.Guid プロパティのページへのリンク