Edit

Share via


SqlFunctions.Ascii(String) Method

Definition

Returns the ASCII code value of the left-most character of a character expression.

public:
 static Nullable<int> Ascii(System::String ^ arg);
[System.Data.Objects.DataClasses.EdmFunction("SqlServer", "ASCII")]
public static int? Ascii (string arg);
[<System.Data.Objects.DataClasses.EdmFunction("SqlServer", "ASCII")>]
static member Ascii : string -> Nullable<int>
Public Shared Function Ascii (arg As String) As Nullable(Of Integer)

Parameters

arg
String

A valid string.

Returns

The ASCII code of the first character in the input string.

Attributes

Remarks

You cannot call this function directly. This function can only appear within a LINQ to Entities query.

This function is translated to a corresponding function in the database. For information about the corresponding SQL Server function, see ASCII (Transact-SQL).

Applies to