r/shittyprogramming • • Nov 20 '18

How to Capitalize a String

word.ToCharArray()[0] = word.ToCharArray()[0].ToString().ToUpper().ToCharArray()[0];

69 Upvotes

37 comments sorted by

View all comments

Show parent comment

1

u/TheTrueSwishyFishy Nov 21 '18

Good to know I guess, I must’ve been using an editor that gave me a warning for it once knowing it wouldn’t work and never used it since