Creates a request to create a new entry in the container.
[Visual Basic] Public Function Create( _ ByVal name As String, _ ByVal schemaClassName As String _ ) As DirectoryEntry [C#] public DirectoryEntry Create( string name, string schemaClassName ); [C++] public: DirectoryEntry* Create( String* name, String* schemaClassName ); [JScript] public function Create( name : String, schemaClassName : String ) : DirectoryEntry;
A DirectoryEntry that represents the new entry.
Exception Type | Condition |
---|---|
COMException | The DirectoryEntry already exists. The associated error code is E_ADS_OBJECT_EXISTS. |
Note You must call the CommitChanges method on the new entry to make the creation persistent.
This allows for creation of mandatory property values on the new entry.
DirectoryEntryCollection Class | DirectoryEntryCollection Members | System.DirectoryServices Namespace | DirectoryEntry