Data ListFind String(String, String, Int 32, Boolean, Boolean) Method
Finds the first item after the given index whose given data member matches the given string. Partial
matches and case-sensitivity are optional.
Definition
Namespace: EWSoftware.ListControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
The zero-based index of the first item found. Returns -1 if no match is found.
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2024.12.31.0
C#
public int FindString(
string member,
string key,
int startIndex,
bool exactMatch,
bool ignoreCase
)VB
Public Function FindString (
member As String,
key As String,
startIndex As Integer,
exactMatch As Boolean,
ignoreCase As Boolean
) As IntegerC++
public:
int FindString(
String^ member,
String^ key,
int startIndex,
bool exactMatch,
bool ignoreCase
)F#
member FindString :
member : string *
key : string *
startIndex : int *
exactMatch : bool *
ignoreCase : bool -> int Parameters
- member String
- The member in the data source to search for the string value.
- key String
- The string for which to search.
- startIndex Int32
- The zero-based index of the item before the first item to be searched. Set to -1 to search from the beginning of the list.
- exactMatch Boolean
- Specify true to find an exact match or false to find the first item starting with the specified string.
- ignoreCase Boolean
- Specify true for a case-insensitive search or false for a case-sensitive search.
Return Value
Int32The zero-based index of the first item found. Returns -1 if no match is found.
Exceptions
| ArgumentOutOfRangeException | This is thrown if the start index value is not within the bounds of the list and it is not -1 or if the specified member could not be found in the data source. |
| ArgumentNullException | This is thrown if the member name or the item to find is null. |