Edit

Share via


LikeOperator.LikeString(String, String, CompareMethod) Method

Definition

Performs binary or text string comparison given two strings. This helper method is not meant to be called directly from your code.

public static bool LikeString(string? Source, string? Pattern, Microsoft.VisualBasic.CompareMethod CompareOption);
public static bool LikeString(string Source, string Pattern, Microsoft.VisualBasic.CompareMethod CompareOption);

Parameters

Source
String

The string to compare.

Pattern
String

The string against which Source is being compared.

CompareOption
CompareMethod

A CompareMethod enumeration specifying whether or not to use text comparison. If Text, this method uses text comparison; if Binary, this method uses binary comparison.

Returns

True if the strings match; otherwise, False.

Remarks

For more information, see Option Compare Statement.

Applies to

Product Versions
.NET Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1