SqlHelpers.TranslateVBLikePattern Method (String, Char)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

This API supports the product infrastructure and is not intended to be used directly from your code.

Translates a search pattern for the Visual Basic Like operator to a search pattern for the SQL Server LIKE operator.

Namespace:   System.Data.Linq.SqlClient
Assembly:  System.Data.Linq (in System.Data.Linq.dll)

public static string TranslateVBLikePattern(
	string pattern,
	char escape


Type: System.String

The Visual Basic Like search pattern to translate to a SQL Server LIKE search pattern.

Type: System.Char

The character to use to escape special SQL characters or the escape character itself.

Return Value

Type: System.String

A search pattern for the SQL Server LIKE operator that corresponds to the specified Visual Basic Like search pattern.

.NET Framework
Available since 3.5
Windows Phone Silverlight
Available since 7.1
Return to top