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 that? Something like:
if (obj is byte, int, long)
I know that my example is impossible, but is there a way to make this "cleaner"?
c # if-statement
Jon tackabury
source share