Convert first character of string to uppercase

By Satyapriya Nayak Blogs | Visual C# Feb 26, 2013
In this blog we will know how to convert first character of string to uppercase.
Download Files: First character uppe

In this blog we will know how to convert first character of string to uppercase.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Globalization;
namespace First_character_uppercase
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void btn_upper_Click(object sender, EventArgs e)
        {
            listBox1.Items.Add(firstcharacterupper(textBox1.Text));
            textBox1.Text = "";
        }
        public string firstcharacterupper(string str)
        {
            return CultureInfo.CurrentCulture.TextInfo.ToTitleCase(str.ToLower());
        }
    }
}

COMMENT USING

PREMIUM SPONSORS

Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.

Latest Blogs