Generics that restricts the types to Int, Double, long
No, unfortunately there is no such restriction possible. The closest you can get is using struct, IConvertible
as generic type constraint.
You may want to read this question though.
This is not possible currently.
Also, see this question for a possible workaround