I need to find if user account is enabled or disabled in AD.
i Cant find the flag or property \"userAccountControl\". is this can be achieved using USER
If you just need to find out if user is enabled or disable you can do it a bit simpler with the following:
PrincipalContext context = new PrincipalContext(ContextType.Domain);
UserPrincipal user = UserPrincipal.FindByIdentity(context, IdentityType.SamAccountName, searchTextBox.Text.Trim());
if(user.Enabled == true) MessageBox.Show("Account enabled!");
else MessageBox.Show("Account disabled!");