r/programminghorror • • Sep 03 '26

C# Very readable and maintainable method

Post image

I wrote this several years ago. It does work.

132 Upvotes

21 comments sorted by

View all comments

Show parent comment

3

u/MeLittleThing Sep 04 '26

C# does let you use character literals, right?

yes, and there are methods in the char struct, such as char.IsLetter(c), char.IsUpper(c) and so on

1

u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Sep 04 '26

I suppose those are practically mandatory if you want proper Unicode support. This method only seems to care about ASCII strings.