MatchEvaluator 代理人

定義

Replace(String, MatchEvaluator) メソッド操作中に正規表現の一致が見つかるたびに呼び出されるメソッドを表します。

public delegate System::String ^ MatchEvaluator(Match ^ match);
public delegate string MatchEvaluator(Match match);
[System.Serializable]
public delegate string MatchEvaluator(Match match);
type MatchEvaluator = delegate of Match -> string
[<System.Serializable>]
type MatchEvaluator = delegate of Match -> string
Public Delegate Function MatchEvaluator(match As Match) As String 

パラメーター

match
Match

Match メソッドの操作中に一致する 1 つの正規表現を表すReplace(String, MatchEvaluator) オブジェクト。

戻り値

MatchEvaluator デリゲートによって表されるメソッドによって返される文字列。

属性

注釈

MatchEvaluatorデリゲート メソッドを使用して、Replace(String, MatchEvaluator)などの置換メソッドによって検出された各一致に対してカスタム検証または操作操作を実行できます。 一致する文字列ごとに、Replace(String, MatchEvaluator) メソッドは、一致を表すMatchEvaluator オブジェクトを使用してMatchデリゲート メソッドを呼び出します。 デリゲート メソッドは任意の処理を実行し、 Replace(String, MatchEvaluator) メソッドが一致した文字列に置き換える文字列を返します。

拡張メソッド

名前 説明
GetMethodInfo(Delegate)

指定したデリゲートによって表されるメソッドを表すオブジェクトを取得します。

適用対象

こちらもご覧ください