Ok i am having some issues designing a base-class to handle generics. Caveat is i need to restrict the type put in as a Numeric type, specifically Int16, Int32, or Int64 (Short or Long).
I know you can do Of T as {Structure} but i dont want to allow non-whole numbers as the type.
Any Suggestions?
The best I can think of is to make a
Friendgeneric class and build 6 classes inheriting from it. TheFriendmakes the member private, except to the containing project. This prevents anything outside the project from instantising it asIntXClass(Of Double)for example.