Proper Case Title Case Question

Posted by Michael Quiles on Stack Overflow See other posts from Stack Overflow or by Michael Quiles
Published on 2010-05-16T15:13:45Z Indexed on 2010/05/16 15:20 UTC
Read the original article Hit count: 524

Filed under:

What am i doing wrong here? I want the users name to be shown in the output as propercase but I cant figure it out.

string proper = this.xTripNameTextBox.Text;
CultureInfo properCase = System.Threading.Thread.CurrentThread.CurrentCulture;
TextInfo currentInfo = properCase.TextInfo;
proper = currentInfo.ToTitleCase(proper);

this.xTripOutputLabel.Text = proper +  Environment.NewLine + "The total gallons you would use: " + Output.ToString("0") + Environment.NewLine + "Total amount it will cost you: " + Coutput.ToString("C") + Environment.NewLine +" Your customer number is " + rnd1.Next(1, 1000).ToString(); 

© Stack Overflow or respective owner

Related posts about c#