Bjr,
j'ai un
MatchEvaluator myEvaluator = new MatchEvaluator(MatchReplace);
et
1 2 3 4 5 6 7 8 9
| private static string MatchReplace(Match m)
{
if (m.Value[0] == '1')
return "1:" + GetDateYyyymmdd();
if (m.Value[0] == '2')
return "2:" + GetDateYyyymmdd();
else
return m.Value;
} |
est ce possible de passer un argument a MatchReplace ?
genre un truc:
MatchEvaluator myEvaluator = new MatchEvaluator(MatchReplace(value, "blah"));
1 2 3 4 5 6 7 8 9
| private static string MatchReplace(Match m, string s)
{
if (m.Value[0] == '1')
return "1:" + GetDateYyyymmdd();
if (m.Value[0] == '2')
return "2:" + GetDateYyyymmdd();
else
return m.Value;
} |
merci
Partager