C# Question

  • Thread starter Thread starter Jason MacKenzie
  • Start date Start date
J

Jason MacKenzie

I'm new to C#. Can someone please explain to me what the second line means?
I'm trying to change it to VB.Net.

Thanks for any help.

Jason MacKenzie



int iUAC = (int)deUser.Properties["userAccountControl"].Value;

aAccountLocked = ((iUAC (int)ActiveDs.ADS_USER_FLAG.ADS_UF_LOCKOUT) != 0);
 
aAccountLocked = ((iUAC (int)ActiveDs.ADS_USER_FLAG.ADS_UF_LOCKOUT) != 0);

It looks like a syntax error to me... :) My guess is there should be some
operator between iUAC and (int)... for instance:
aAccountLocked = ((iUAC & (int)ActiveDs.ADS_USER_FLAG.ADS_UF_LOCKOUT) != 0);
would check if the bit in iUAC corresponding to ADS_UF_LOCKOUT flag is set.
 
Back
Top