Directory Services

Boolean Property Type

The Boolean property type is used for properties such as isDefunct and isDeleted. In ADSI, this property type is called ADSTYPE_BOOLEAN.

Note  In the Active Directory Schema, Boolean is represented in the Syntax row of attribute tables with the Syntax ID of 2.5.5.8.

The following code example shows how to read a property with a Boolean value.

[Visual Basic .NET]
Console.WriteLine(usr.Properties("isDeleted").Value)
[C#]
Console.WriteLine(usr.Properties["isDeleted"].Value);

The following code example shows how to set a property with a Boolean value to true.

[Visual Basic .NET]
usr.Properties("isDeleted").Value = True
usr.CommitChanges()
[C#]
usr.Properties["isDeleted"].Value = true;
usr.CommitChanges();