I'm currently being visually assaulted by all of the names that are being displayed and entered on one of my systems. Basically, users have use of an on-screen keyboard and don't tend to write things in neatly! I.e. John Smith ends up getting entered as JOHN SMITH or john smith.
I want a way to neatly enter names and display them. I've written a method that goes through all the names and does just this, but it's about 20 lines of code and not very efficient.
Is there a good way of achieving this? I have tried .ToTitleCase(), but it doesn't work for cases such as O'Brien and McCarthy? Is there anything out there than can do this, nicely? My code at the moment basically has a list of special cases and goes through and manipulates them if they contain the special case... It's not the most efficient thing in the world though.
Thanks in advance.