Ben Voigt <rb*@nospam.nospamwrote:
>
"fAnSKyer/C# newbie" <fa******@gmail.comwrote in message
news:11*********************@o5g2000hsb.googlegrou ps.com...
Sorry for this stupid question.
I am using c way s[0] = s[0] -'a' +'A'
but I can't compile it.
Use a StringBuilder instead.
There's no point in using a StringBuilder here:
s = char.ToUpper(s[0])+s.Substring(1);
Okay, there's a box involved, but there won't be any wasted space
(easily avoided with StringBuilder, admittedly), and you won't be
creating a StringBuilder object.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog:
http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too