System Directoryservices C# by API

using System;
using System.DirectoryServices;
public class DirectoryBinding
{
  public static int Main(string[] args)
  {
    DirectoryEntry MyDirectoryObject = new DirectoryEntry();
    
    MyDirectoryObject.Path = "LDAP://HMSRevenge/rootDSE";
    MyDirectoryObject.Username = @"Test\yourname";
    MyDirectoryObject.Password = @"MyPassword";
    return 0;
  }
}