EdmFunctions.Replace(DbExpression, DbExpression, DbExpression) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
建立 DbFunctionExpression 一個,用指定的參數呼叫典型的「替換」函式,且每個參數必須有字串結果型別。 表達式的結果類型也是字串。
public:
[System::Runtime::CompilerServices::Extension]
static System::Data::Common::CommandTrees::DbFunctionExpression ^ Replace(System::Data::Common::CommandTrees::DbExpression ^ stringArgument, System::Data::Common::CommandTrees::DbExpression ^ toReplace, System::Data::Common::CommandTrees::DbExpression ^ replacement);
public static System.Data.Common.CommandTrees.DbFunctionExpression Replace(this System.Data.Common.CommandTrees.DbExpression stringArgument, System.Data.Common.CommandTrees.DbExpression toReplace, System.Data.Common.CommandTrees.DbExpression replacement);
static member Replace : System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression * System.Data.Common.CommandTrees.DbExpression -> System.Data.Common.CommandTrees.DbFunctionExpression
<Extension()>
Public Function Replace (stringArgument As DbExpression, toReplace As DbExpression, replacement As DbExpression) As DbFunctionExpression
參數
- stringArgument
- DbExpression
一個指定執行替換操作的字串的表達式。
- toReplace
- DbExpression
一個指定被替換字串的表達式。
- replacement
- DbExpression
一個指定替換字串的表達式。
傳回
新的 DbFunctionExpression 會回傳一個新字串,根據 stringArgument 每個 的 toReplace 出現都被替換為 replacement。
例外狀況
stringArgument或toReplacereplacement是 null。
stringArgument 或者 toReplacereplacement 或 無效。