Why is the struct allowed but the class isn't?

The error is CS8618 - Non-nullable variable must contain a non-null value when exiting constructor. Consider declaring it as nullable.

The struct is readonly if that matters.
image.png
Was this page helpful?