String Property Type

This topic shows how to read a generic string. In the underlying ADSI, this property type is used for the following ADS types:

  • ADSTYPE_DN_STRING
  • ADSTYPE_CASE_EXACT_STRING
  • ADSTYPE_IGNORE_STRING
  • ADSTYPE_PRINTABLE_STRING
  • ADSTYPE_NUMERIC_STRING

Note  In the Active Directory Schema, string is represented in the Syntax row of attribute tables with the Syntax ID: 2.5.5.5.

The following code example shows how to read a string.

[Visual Basic .NET]

Dim domainName As [String] = ent.Properties("dc").Value.ToString()
Console.WriteLine(domainName)

[C#]

String domainName= ent.Properties["dc"].Value.ToString();
Console.WriteLine(domainName);