Can anyone tell me if there is a way with generics to limit a generic type argument T
to only:
Int16
Int32
I was wondering the same as samjudson, why only to integers? and if that is the case, you might want to create a helper class or something like that to hold all the types you want.
If all you want are integers, don't use a generic, that is not generic; or better yet, reject any other type by checking its type.