Click or drag to resize

LinqExtensionsLike Method

Returns a bool indicating whether the string mathes the given like pattern (use '%' for wildchar)

Namespace:  Aloe.SystemFrameworks.Domain.LINQ
Assembly:  Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntax
public static bool Like(
	this string str,
	string likePattern
)

Parameters

str
Type: SystemString
The string to be matched
likePattern
Type: SystemString
The string containing the like pattern

Return Value

Type: Boolean
True if the string is matching the like pattern, false otherwise

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. 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).
Remarks
The like pattern mathes directly the string with the only special character being the '%' which matches any number of characters. This method is recognized by ObjectQuery parser as a valid LINQ method for filtering data sources.
See Also