Compartir a través de


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

  1. Start Visual Studio.

  2. Click File>New>Project.

  3. In the Project Type column, click the project type (C# or Visual Basic).

  4. In the Template column, click a project template (Console Application or Windows Application).

  5. Name the project.

  6. Click OK to create the new project.

  7. Click Project>Add Reference.

  8. In the Add Reference dialog box, select System.DirectoryServices.dll from the list.

  9. Click OK to add the reference.

  10. 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

System.DirectoryServices

Concepts

Getting Started in System.DirectoryServices

Send comments about this topic to Microsoft.

Copyright © 2007 by Microsoft Corporation. All rights reserved.