Match evaluator returning uppercase of matching character - CSharp System

CSharp examples for System:String Case

Description

Match evaluator returning uppercase of matching character

Demo Code


using System.Text.RegularExpressions;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;/* ww  w .j ava 2  s .  co m*/

public class Main{
        #region Private methods
        /// <summary>
        /// Match evaluator returning uppercase of matching character
        /// </summary>
        /// <param name="m">matching character</param>
        /// <returns>the same character to uppercase</returns>
        private static string _ToUpperCase(Match m)
        {
            char c = m.Captures[0].Value[0];
            return Char.ToUpper(c).ToString();
        }
}

Related Tutorials