title: Giving a string a null value
body: <p>I am in need of some information on how I can set this string in the code snippet below to a <code>null</code> value.</p>
  
  <pre><code>[Index(IsUnique = true)]
  [StringLength(450)]
  public string StockCode
  {
      get { return _stockCode; }
      set { _stockCode = value.ToUpper(); } //(ToUpper)&lt;&lt;-- Error
  }
  </code></pre>
  
  <p>When I try to do it the normal way <code>public string? StockCode</code> I get the error at my <code>.ToUpper</code> and it says:</p>
  
  <blockquote>
    <p>'System.Nullable' does not contain a definition for 'ToUpper'
    and no extension method 'ToUpper' accepting a first argument of type
    'System.Nullable' could be found (are you missing a using
    directive or an assembly reference?)</p>
  </blockquote>
  
  <p>I am no expert or pro C# coder, so I have no clue how to set my string to a null value and still use <code>.ToUpper</code> in the way I am trying to do it. :( Any advice would be appreciated!</p>