Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DirectoryEntry.SchemaClassName Property

Gets the name of the schema class for this DirectoryEntry object.

Namespace: System.DirectoryServices
Assembly: System.DirectoryServices (in system.directoryservices.dll)

public string SchemaClassName { get; }
/** @property */
public String get_SchemaClassName ()

public function get SchemaClassName () : String

Not applicable.

Property Value

The name of the schema class for this DirectoryEntry object.

This is the same as the Name property of the SchemaEntry property.

A DirectoryEntry object's schema defines its properties and methods.

The following example demonstrates the SchemaClassName and SchemaEntry properties of the DirectoryEntry class. This example gets the user-specified DirectoryEntry and gets all of its children if the SchemaEntry is a container object. The SchemaEntry is a container object if the Name of that object is "container".

String myADSPath = "LDAP://onecity/CN=Users,DC=onecity,DC=corp,DC=fabrikam,DC=com";

// Creates an Instance of DirectoryEntry.
DirectoryEntry  myDirectoryEntry=new DirectoryEntry(myADSPath, UserName, SecurelyStoredPassword);

// Display the 'SchemaClassName'.
Console.WriteLine("Schema class name:" + myDirectoryEntry.SchemaClassName);

// Gets the SchemaEntry of the ADS object.
DirectoryEntry mySchemaEntry = myDirectoryEntry.SchemaEntry;

if (string.Compare(mySchemaEntry.Name, "container") == 0)
{
   foreach(DirectoryEntry myChildDirectoryEntry in myDirectoryEntry.Children)
      Console.WriteLine(myChildDirectoryEntry.Path);
}

Windows 98, Windows Server 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

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft