I'm just wondering whether .Net has a built-in enum of chars anywhere.
I'm just parsing a CSV file and it occured to me I'd like to be able to do something like:
line.Split(Chars.Comma)
instead of:
line.Split(char(','))
It just seems cleaner to me.
Does .Net have this tucked away anywhere?
Ps: I know Windows.Forms.Keys does in most situations, but doesn't have all the punctuation symbols.
Edit (after most of the answers):
I should have mentioned that I'm coding in Boo, not C# (hence why I asked for .Net in general), so line.Split(',') doesn't work as ',' is a string in Boo.
I hadn't taken into account it would have to cover unicode, which would be massive, whereas all I was planning on using it for are to save me from having to create constants for punctuation symbols every time I create an app which does that kind of text manipulation.
Here's the way I chose to solve this:
static class StingSplitters:
public final Comma = char(',')
public final BackSlash = char('\\')
...
Thanks for all the input.