How to: Set Up Your Development Environment for System.DirectoryServices
This topic describes how to set up a Microsoft .NET Framework project for System.DirectoryServices.
To use System.DirectoryServices
Start Visual Studio.
Click File>New>Project.
In the Project Type column, click the project type (C# or Visual Basic).
In the Template column, click a project template (Console Application or Windows Application).
Name the project.
Click OK to create the new project.
Click Project>Add Reference.
In the Add Reference dialog box, select System.DirectoryServices.dll from the list.
Click OK to add the reference.
Add the following line to your code.
Imports System.DirectoryServices
Using System.DirectoryServices;
If you do not add a using statement or an Imports statement, the application must use the fully-qualified names of objects in the System.DirectoryServices namespace whenever those objects are referenced. For example, to refer to the DirectoryEntry object, you would format it is as follows: System.DirectoryServices.DirectoryEntry.
The format for the fully-qualified name is the same in both Visual Basic and C#.
See Also
Tasks
How to: Create a Simple System.DirectoryServices Application
Reference
Concepts
Getting Started in System.DirectoryServices
Send comments about this topic to Microsoft.
Copyright © 2007 by Microsoft Corporation. All rights reserved.