Interviews - C# Corner

VINAY KUMAR GUPTA
Write a program to perform in sentence each first latter of the word should be in Upper latter.?
By VINAY KUMAR GUPTA in Algorithms in C# onSep 07 2015
  • Ashish Srivastava
    Apr, 2016 23

    http://www.c-sharpcorner.com/code/2637/how-do-i-capitalize-first-letter-of-string-in-C-Sharp.aspx

    • 1
  • VINAY KUMAR GUPTA
    Sep, 2015 7

    Here is a simple solution string str = "hello world";str = str.ToLower();string[] strarray = str.Split(' ');foreach(string st in strarray){char[] ch = st.ToCharArray();ch[0] = char.ToUpper(ch[0]);str += " " + new string(ch);}Console.WriteLine(str.ToString());Out put will :Hello World

    • 1

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS