To uppercase the first letter of a string in C#, use:

        /// <summary>
        /// Capatilize first word in string
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public string UppercaseFirst(string s)
            if (string.IsNullOrEmpty(s))
                return string.Empty;
            char[] a = s.ToCharArray();
            a[0] = char.ToUpper(a[0]);

            return new string(a);

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.