The number of attributes in this collection.
[Visual Basic] MustOverride Public Property ReadOnly Count As Integer _ Implements ICollection.Count [C#] public abstract int Count { get; } [C++] public: abstract __property int get_Count(); [JScript] public abstract function get Count() : int
[C#] using System;
using LdapServices.Ldap;
namespace LDAPSampleCodeConsole
{
class SampleApp
{
static void Main(string[] args)
{
Client client = new Client();
// Connect to the directory
client.Connect("directory.yourServer.ca");
// Search the directory for entries with surname starting with 'Ab'
EntryCollection entries = client.Search("o=yourCompany,c=ca", "sn=Ab*");
// Display the number of attributes in the collection
AttributeCollection attributes = entries[0].Attributes;
Console.WriteLine("Number of Attributes: " + attributes.Count);
client.Disconnect();
}
}
}