I have a line of code that looks like this:
if (obj is byte || obj is int || obj is long || obj is decimal || obj is double || obj is float)
Is it possible to write something more elegant than this? Something like:
if (obj is byte, int, long)
I know that my example isn't possible, but is there a way to make this look "cleaner"?