 | StringArrayExtensionsContains Method (String, String, StringComparison) |
Determines if any of the items in the specified data array match
the specified key using specified string comparison settings.
Namespace:
TestHelperExtensions
Assembly:
CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntaxpublic static bool Contains(
this string[] dataArray,
string key,
StringComparison comparisonType
)
<ExtensionAttribute>
Public Shared Function Contains (
dataArray As String(),
key As String,
comparisonType As StringComparison
) As Boolean
public:
[ExtensionAttribute]
static bool Contains(
array<String^>^ dataArray,
String^ key,
StringComparison comparisonType
)
[<ExtensionAttribute>]
static member Contains :
dataArray : string[] *
key : string *
comparisonType : StringComparison -> bool
Parameters
- dataArray
- Type: SystemString
A list of string values. - key
- Type: SystemString
The value being searched for in the list of strings. - comparisonType
- Type: SystemStringComparison
Specifies the culture, case, and sort rules to be used during string comparison.
Return Value
Type:
BooleanA boolean indicating if the key value was found in the list of values.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type . When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also