title: Is there a way to perform a type specific action in a generic class?
body: <pre class="lang-cs prettyprint-override"><code>class Class1&lt;T&gt;
  {
      T Value;
  
      void Method1()
      {
          if(Value is int)
              Value = 42;//CS0029
      }
  }
  </code></pre>
  
  <p>Is there any way to make code like this work?</p>