Table of Contents

Method StringIn

Namespace
MongoDB.Driver.Linq
Assembly
MongoDB.Driver.dll

StringIn(string, IEnumerable<StringOrRegularExpression>)

Returns true if s is present in values (corresponds to the $in filter operator).

public static bool StringIn(this string s, IEnumerable<StringOrRegularExpression> values)

Parameters

s string

The value to test.

values IEnumerable<StringOrRegularExpression>

The values to test against.

Returns

bool

True if s is present in values.

StringIn(string, params StringOrRegularExpression[])

Returns true if s is present in values (corresponds to the $in filter operator).

public static bool StringIn(this string s, params StringOrRegularExpression[] values)

Parameters

s string

The value to test.

values StringOrRegularExpression[]

The values to test against.

Returns

bool

True if s is present in values.