EdmFunctions.Substring(DbExpression, DbExpression, DbExpression) 方法

定义

创建一个 DbFunctionExpression ,它使用指定的参数调用规范“Substring”函数,该函数必须具有字符串和整数数值结果类型。 表达式的结果类型为字符串。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Data::Common::CommandTrees::DbFunctionExpression ^ Substring(System::Data::Common::CommandTrees::DbExpression ^ stringArgument, System::Data::Common::CommandTrees::DbExpression ^ start, System::Data::Common::CommandTrees::DbExpression ^ length);
public static System.Data.Common.CommandTrees.DbFunctionExpression Substring(this System.Data.Common.CommandTrees.DbExpression stringArgument, System.Data.Common.CommandTrees.DbExpression start, System.Data.Common.CommandTrees.DbExpression length);
static member Substring : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function Substring (stringArgument As DbExpression, start As DbExpression, length As DbExpression) As DbFunctionExpression

参数

stringArgument
DbExpression

一个表达式,指定要从中提取子字符串的字符串。

start
DbExpression

一个表达式,指定应从中获取子字符串的起始索引。

length
DbExpression

一个指定子字符串长度的表达式。

返回

一个新的 DbFunctionExpression,从开头start返回长度lengthstringArgument的子字符串。

例外

stringArgumentstartlengthnull

stringArgumentstartlength 无效。

注解

子字符串要求 开始 指定的索引是基于 <b>1< 的/b>。

适用于