title: generic class and generic methods
body: <pre><code>class test &lt;T&gt; where T : class
  {
      public void Write&lt;T&gt;()
      {
          Console.Write(typeof(T).FullName);
      }
  }
  </code></pre>
  
  <p>In the above class, it is possible to pass in a string for the class (<code>test&lt;string&gt; Test = new test&lt;string&gt;</code>) and then int for the method? If so, what is the output? If not, what problems does this cause? I haven't actually tried this, despite using generics (in my own classes) and generic collections, frequently.</p>
  
  <p>The way I write/see generic classes is as follows:</p>
  
  <pre><code>class &lt;T&gt; where T : class
  {
      public T Write()
      {
          Console.Write(T.ToString());
      }
  }
  </code></pre>