title: Nullable types in generic class
body: <p>I need to create a class similar to this:</p>
  
  <pre><code>class GenericClass&lt;T&gt;
  {
      public T[] Arr {get; }
      public GenericClass(int n)
      {
          Arr = new T[n];
          for (int i = 0; i &lt; n; i++)
          {
              Arr[i] = null;
          }
      }
  }
  </code></pre>
  
  <p>But there is a compiler error:</p>
  
  <blockquote>
    <p><strong>CS0403</strong> Cannot convert null to type parameter 'T' because it could be a non-nullable value type. Consider using 'default(T)' instead.</p>
  </blockquote>
  
  <p>I don't want to use <code>default(T)</code>, because it could be the same as normal value but I need to distinguish. I don't know the type so I can't use minimal value. How can I use null?</p>