title: C# - static types cannot be used as type arguments
body: <p>I've a generic class that helps me to do checks on argument values:</p>
  <pre><code>internal sealed class Argument&lt;T&gt;
      where T : class
  {
      private void TraceAndThrow(Exception ex)
      {
          new InternalTraceHelper&lt;T&gt;().WriteError(ex);
          throw ex;
      }
  
      internal void ThrowNull(object value, string argName)
      {
          if (ReferenceEquals(value, null))
          {
              TraceAndThrow(new ArgumentNullException(argName));
          }
      }
  
      internal void ThrowIf(bool condition, string argName)
      {
          if (condition)
          {
              TraceAndThrow(new ArgumentException(null, argName));
          }
      }
  
  
      internal void ThrowNotInEnum(Type enumType, object value)
      {
          if (!Enum.IsDefined(enumType, value))
          {
              TraceAndThrow(new ArgumentOutOfRangeException(Resources.ArgEnumIllegalVal.InvariantFormat(value)));
          }
      }
  }
  </code></pre>
  <p>But when I try to use it with a static class:</p>
  <pre><code>internal static class Class1
  {
      private static Argument&lt;Class1&gt; _arg;
  }
  </code></pre>
  <p>I got this error (at compilation):</p>
  <blockquote>
  <p>static types cannot be used as type arguments</p>
  </blockquote>
  <p>What am I doing wrong?</p>