Error!
Success!

Structures are unique

0
kicks

Structures are unique  (Unpublished)

I recently stumbled upon this compile time error while trying to change the value of a structure over iteration. The Compiler throws this error when returned structure is modified. The reason is that structures are value types and immutable. The returned structure will be a copy. And any change to the copy doesn't reflect in the original structure hence the compiler prevents from doing this which is not intended.


Kicked By:
Drop Kicked By: