MatchEvaluator Delegate

Definition

Represents the method that is called each time a regular expression match is found during a Replace(String, MatchEvaluator) method operation.

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 

Parameters

match
Match

The Match object that represents a single regular expression match during a Replace(String, MatchEvaluator) method operation.

Return Value

A string returned by the method that is represented by the MatchEvaluator delegate.

Attributes

Remarks

You can use a MatchEvaluator delegate method to perform a custom verification or manipulation operation for each match found by a replacement method such as Replace(String, MatchEvaluator). For each matched string, the Replace(String, MatchEvaluator) method calls the MatchEvaluator delegate method with a Match object that represents the match. The delegate method performs whatever processing you prefer and returns a string that the Replace(String, MatchEvaluator) method substitutes for the matched string.

Extension Methods

Name Description
GetMethodInfo(Delegate)

Gets an object that represents the method represented by the specified delegate.

Applies to

See also