コード例 #1
0
        public static void Authenticate(string username, string password)
        {
            Domain domain = Domain.GetCurrentDomain();
            var    d      = new ADDomain(domain.Name.ToString());

            if (d.IsValidLogin(username, password) == true)
            {
                Console.WriteLine("The logon is valid.");
            }
            else
            {
                Console.WriteLine("The logon is invalid.");
            }
        }