Visual Guard Class Library Documentation

VGMembership.FindUsersByName Method (String, Int32, Int32, Int32&)

Gets a collection of membership users where the user name contains the specified user name to match.

public static VGMembershipUserCollection FindUsersByName(
   String usernameToMatch,
   Int32 pageIndex,
   Int32 pageSize,
   out Int32& totalRecords
);

Parameters

usernameToMatch
The user name to search for.
pageIndex
The index of the page of results to return. pageIndex is zero-based.
pageSize
The size of the page of results to return.
totalRecords
The total number of matched users.

Return Value

A VGMembershipUserCollection that contains a page of pageSizeMembershipUser objects beginning at the page specified by pageIndex.

Exceptions

Exception Type Condition
ArgumentException usernameToMatch is longer than 64 characters.

-or -

pageIndex is less than 0.

-or -

pageSize is less than 1.

-or -

pageSize multiplied by pageIndex, plus pageSize, minus 1 is greater than MaxValue
SecurityException The current user has not enough privileges to use Membership API. The Membership access level of the application must be sufficient to allows this action or the 'Membership Manager' role must be granted to the user by using the Visual Guard console.

See Also

VGMembership Class | Novalys.VisualGuard.Security.Membership Namespace | VGMembership.FindUsersByName Overload List