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

定義

建立會使用指定引數叫用標準 'Substring' 函式的 DbFunctionExpression,其中的引數必須具有字串和整數數值結果型別。 運算式的結果類型為字串。

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

運算式,指定子字串的長度。

傳回

從開始start傳回長度lengthstringArgument子字串的新 DbFunctionExpression。

例外狀況

stringArgumentstartlengthnull

stringArgumentstartlength 無效。

備註

子字串要求 開頭 所指定的索引必須是 <b>1 型</b>。

適用於