Table of Contents

Method StringIn

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

StringIn(FieldDefinition<TDocument, string>, IEnumerable<StringOrRegularExpression>)

Creates an in filter for a string field.

public FilterDefinition<TDocument> StringIn(FieldDefinition<TDocument, string> field, IEnumerable<StringOrRegularExpression> values)

Parameters

field FieldDefinition<TDocument, string>

The field.

values IEnumerable<StringOrRegularExpression>

The values.

Returns

FilterDefinition<TDocument>

An in filter.

StringIn(FieldDefinition<TDocument, string>, params StringOrRegularExpression[])

Creates an in filter for a string field.

public FilterDefinition<TDocument> StringIn(FieldDefinition<TDocument, string> field, params StringOrRegularExpression[] values)

Parameters

field FieldDefinition<TDocument, string>

The field.

values StringOrRegularExpression[]

The values.

Returns

FilterDefinition<TDocument>

An in filter.

StringIn(Expression<Func<TDocument, string>>, IEnumerable<StringOrRegularExpression>)

Creates an in filter for a string field.

public FilterDefinition<TDocument> StringIn(Expression<Func<TDocument, string>> field, IEnumerable<StringOrRegularExpression> values)

Parameters

field Expression<Func<TDocument, string>>

The field.

values IEnumerable<StringOrRegularExpression>

The values.

Returns

FilterDefinition<TDocument>

An in filter.

StringIn(Expression<Func<TDocument, string>>, params StringOrRegularExpression[])

Creates an in filter for a string field.

public FilterDefinition<TDocument> StringIn(Expression<Func<TDocument, string>> field, params StringOrRegularExpression[] values)

Parameters

field Expression<Func<TDocument, string>>

The field.

values StringOrRegularExpression[]

The values.

Returns

FilterDefinition<TDocument>

An in filter.