EdmFunctions.Left(DbExpression, DbExpression) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立 DbFunctionExpression 一個,喚出標準的「Left」函式,並包含指定的參數,且必須有字串和整數數值的結果型別。 表達式的結果類型為字串。
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbFunctionExpression ^ Left(System::Data::Common::CommandTrees::DbExpression ^ stringArgument, System::Data::Common::CommandTrees::DbExpression ^ length);
public static System.Data.Common.CommandTrees.DbFunctionExpression Left(this System.Data.Common.CommandTrees.DbExpression stringArgument, System.Data.Common.CommandTrees.DbExpression length);
static member Left : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function Left (stringArgument As DbExpression, length As DbExpression) As DbFunctionExpression
參數
- stringArgument
- DbExpression
一個表示式,指定從哪個字串中提取最左邊的子字串。
- length
- DbExpression
一個表示式,指定從中提取 stringArgument的最左邊子串長度。
傳回
一個新的 DbFunctionExpression,回傳長度length為 的最左邊子串。stringArgument
例外狀況
stringArgument 或 length 為 null。
stringArgument 無效。