Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • When my Property equivalent to Days is null in all my equivalent Product Class Objects, I get a 'System.NullReferenceException'. How do I avoid that Exception (i.e. without first explicitly (i.e. via a separate Statement) scanning Product Class Objects first to ensure at least one has a non-null Days Property)? Hoping for something like a Null Conditional Operator. Commented May 16, 2019 at 3:57
  • @Tom: Either add where product.Days != null first or add ?? Enumerable.Empty<T>(). I don't know how that would work with a query provider, though. Commented May 16, 2019 at 14:41