Partager via


SqlHelpers.TranslateVBLikePattern Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

This API supports the .NET Framework 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)

Syntax

'Declaration
Public Shared Function TranslateVBLikePattern ( _
    pattern As String, _
    escape As Char _
) As String
public static string TranslateVBLikePattern(
    string pattern,
    char escape
)

Parameters

  • pattern
    Type: System.String
    The Visual Basic Like search pattern to translate to a SQL Server LIKE search pattern.
  • escape
    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.

Version Information

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.