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

定義

建立會使用指定引數叫用標準 'Replace' 函式的 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 無效。

適用於