Bjr,

j'ai un
Code : Sélectionner tout - Visualiser dans une fenêtre à part
MatchEvaluator myEvaluator = new MatchEvaluator(MatchReplace);

et

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
MatchEvaluator myEvaluator = new MatchEvaluator(MatchReplace(value, "blah"));

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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