Change Programmatically the First Letter of a String to Upper Case

Introduction

In this article I am discussing about a way to change the first letter of a string to upper case. For example the string “mohammed ashraf” will change to “Mohammed Ashraf”. And also the string “MOHAMMED ASHRAF” will change “Mohammed Ashraf”.

Step 1 - Creating a Windows Form Application.



Step 2 - Create a Form with One Label, TextBox and Button.



Step 3 - Create a Class in the name of StringHelper

Project -> Add Class



Step 4 - Write following code in the Class.
 

Step 5 - Button Click Event

X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now