This post will discuss how to capitalize the first letter of a string in C#.

The idea is to extract the first character from the string, convert it to uppercase using the ToUpper() method, and append it with the remaining string. You can extract the substring starting from the second character till its end using the Substring() method.

Download  Run Code

 
Alternatively, you can convert the string to a character array and convert the first character to uppercase. Then, construct a new string using the string constructor.

Download  Run Code

That’s all about capitalizing the first letter of a string in C#.