title: declaring a vary generic class
body: <p>In my project I have 2 interfaces.</p>
  
  <p><code>IButtonInputHandler&lt;T&gt;</code> &amp;  <code>INumericInputHandler&lt;T&gt;</code> </p>
  
  <p>Now I want to create a class that gets the first interface\the second interface\both of them and exposes methods based on their types. For example, if I build the class with <code>IButtonInputHandler&lt;Buttons&gt;</code> and <code>INumericInputHandler&lt;Scroller&gt;</code>, I want to expose two functions that receive Button and Scroller objects.</p>
  
  <p>If I build the class with only <code>IButtonInputHandler&lt;Keys&gt;</code>, I want to expose a function that will receive a Buttons object.</p>
  
  <p>To be clear -- if I leave the option to use 2 types dynamically my class will be like this:</p>
  
  <p><code>Class&lt;T&gt;</code> and the method will return T.</p>
  
  <p>Basically I need the flexibility to sometimes use 1 type and sometimes use 2 types.</p>