다음을 통해 공유


SearchForIndexByDisplayName Method

Topic Last Modified: 2006-06-13

Returns the index of an entity in a DACL object by a specified display name.

Applies To

DACL Object

Syntax


ndxEntity  objDACL.SearchForIndexByDisplayName(strDisplayName);

Parameters

  • strDisplayName
    A string value of the display name for the specified security principal such as "Jane Clayton."

Return Value

A long value of the entity s index. This method returns a negative number if the entity is not found.

Remarks

This method is not the most effective search method because only the first matched entity would be found if more than one entity had the same display name.

Indexes are zero-based.

Example

var index = objDacl.SearchForIndexByDisplayName("Jane Clayton");
if(index<0){
    //user not found
}