title: How to use generics to pass argument to a non-generic method?
body: <p>Why does the following code not compile?
  How can I create a generic method which calls the appropriate "BitConverter.GetBytes" overload based on if the generic type is an "int", "bool", "char", etc.?
  More generally, how can I create a generic method which calls a non-generic method based on the generic parameter's type?</p>
  
  <pre><code>using System;
  
  public class Test
  {
      public static void Main()
      {
        var f = new Foo();
        f.GetBytes(10); // should call BitConverter.GetBytes(int);
        f.GetBytes(true); // should call BitConverter.GetBytes(bool);
        f.GetBytes('A'); // should call BitConverter.GetBytes(char);
      }
  }
  
  public class Foo
  {
      public byte[] GetBytes &lt;TSource&gt; (TSource input)
      {
        BitConverter.GetBytes(input);
      }
  }
  </code></pre>