共用方式為


SqlFunctions.Ascii(String) 方法

定義

傳回字元運算式最左側字元的 ASCII 碼值。

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)

參數

arg
String

有效的字串。

傳回

輸入字串中第一個字元的 ASCII 碼。

屬性

備註

您無法直接呼叫此函式。 此函式只能出現在 LINQ to Entities 查詢中。

此函式會轉譯為資料庫中的對應函式。 如需對應 SQL Server 函式的相關信息,請參閱 ASCII (Transact-SQL)

適用於