EdmFunctions.Substring(DbExpression, DbExpression, DbExpression) 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立會使用指定引數叫用標準 '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);
C#
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
傳回長度length
stringArgument
子字串的新 DbFunctionExpression。
stringArgument
、start
或 length
為 null
。
stringArgument
、 start
或 length
無效。
子字串要求 開頭 所指定的索引必須是 <b>1 型</b>。
產品 | 版本 |
---|---|
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |