xFactorSchool.com
Python
JavaScript
How to Do Examples
C Examples
Python Examples
HTML Examples
Code Examples
C Code Examples
C++ Code Examples
C# Code Examples
Java Code Examples
Python Code Examples
HTML Code Examples
CSS Code Examples
JavaScript Code Examples
Online Compilers
C Compiler
C++ Compiler
C# Compiler
Java Compiler
Python Compiler
HTML Code Editor
CSS Code Editor
JavaScript Compiler
JavaScript Code Editor
Practice how to convert the first character of each word of a string to uppercase in C#
C# Online Editor
Execute Code
More C# Sample Code
using System; using System.Globalization;//use this namespace namespace ExampleApp { class Program { static void Main() { string strVariable = "C# is a great programming language."; //First convert the string to lowercase string lowerString = strVariable.ToLower(); //use CulturalInfo and TextInfo CultureInfo cultureInfo = CultureInfo.CurrentCulture; TextInfo textInfo = cultureInfo.TextInfo; string newString = textInfo.ToTitleCase(lowerString); // ToTitleCase() method of TextInfo Console.WriteLine(newString);//Output: C# Is A Great Programming Language. } } }