title: C# creating a non-nullable string. Is it possible? Somehow?
body: <p>So you can't inherit <code>string</code>. You can't make a non-nullable <code>string</code>. But I want to do this. I want a class, let's call it nString that returns a default value when it would otherwise be null. I have JSON objects that might have who knows how many null strings, or even null objects. I want to create structs that have strings that will never return null.</p>
  
  <pre><code>public struct Struct
  {
      public nString value;
      public nString value2;
  }
  </code></pre>
  
  <p>I suppose I could do something like this:</p>
  
  <pre><code>public struct Struct
  {
      public string val { get { return val ?? "N/A"; } set { val = value; } }
      public string val2 { get { return val2 ?? "N/A"; } set { val2 = value; } };
  }
  </code></pre>
  
  <p>But that's so much more work. Is there any way to do this?</p>