Internet Direct (Indy) Version 9.0.1 Beta
TIdUserAccounts.UserNames
Provides indexed access to accounts by user name.

property UserNames [const AUserName: String]: TIdUserAccount;
Description
UserNames is a read-only TIdUserAccount property that provides indexed access to the user account object instances maintained in the Items property. The index specifier is a String that is compared to the TIdUserAccount.UserName property to locate a specific object instance.

When CaseSensitiveUsernames is True, the read access specifier for the property will consider case to be significant in comparing the user name values. When CaseSensitiveUsernames is False, AnsiSameText is used to perform the name comparison.

The return value for the property will be Nil when a user account cannot be located having the specified index value.

Use Items to access user accounts by their integer position in the collection.

Use Add to create a new user account in the collection.