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

定義

建立 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

例外狀況

stringArgumenttoReplacereplacementnull

stringArgument 或者 toReplacereplacement 或 無效。

適用於