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

定义

创建一个 DbFunctionExpression 调用规范“Replace”函数的指定参数,每个参数都必须具有字符串结果类型。 表达式的结果类型也是字符串。

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 replacementtoReplace无效。

适用于