title: How to check with C#, in more elegant way, if only some of the object properties are null?
body: <p>I have an objekt:</p>
  <pre><code>var object = new SomeObjectType()
  {
     Prop1 = null,
     Prop2 = null,
     Prop3 = 665
  }
  </code></pre>
  <p>Assuming that <code>Prop3</code> will be never <code>null</code>, how can I verify if rest of the properties are <code>null</code>, or one of them is not?</p>
  <p>Right now I have:</p>
  <pre><code>if (object.Prop1 == null &amp;&amp; object.Prop2 == null)
  {
     //do stuff
  }
  </code></pre>
  <p>But this is very not elegant, especially if I have pore properties to verify. And I have no idea how could I use <a href="https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/member-access-operators#null-conditional-operators--and-" rel="nofollow noreferrer">Null-conditional operators ?. and ?[]</a> in my case.</p>
  <p>How to do it with C#?</p>