M
Morten
Hi!
I'm trying to determine if an AD user has the "Password never expires" flag
set. I've only been able to find some vb script examples that show how to do
this but I haven't been able to translate this to C#.
I've tried this:
if ((dirEntry.Properties["userAccountControl"].Value &&
UF_DONT_EXPIRE_PASSWD) == 0)
but that results in an error: Operator '&&' cannot be applied to operands of
type 'object' and 'int'
Can someone help with this?
Thanks in advance
Morten
I'm trying to determine if an AD user has the "Password never expires" flag
set. I've only been able to find some vb script examples that show how to do
this but I haven't been able to translate this to C#.
I've tried this:
if ((dirEntry.Properties["userAccountControl"].Value &&
UF_DONT_EXPIRE_PASSWD) == 0)
but that results in an error: Operator '&&' cannot be applied to operands of
type 'object' and 'int'
Can someone help with this?
Thanks in advance
Morten