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)

适用于