Directory Services

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:

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);