Why we cannot modify stored properties of constant Struct instances?

We cannot modify the properties (constant and variable stored properties) of struct instances assigned to a constant because, structures are value types. When a instance of a value type is marked as a constant , all of its properties will automatically get marked as constants and no modification is allowed.

Leave a Reply