Does using public readonly fields for immutable structs work?
If you’re going to use structs, it is a best practice to make them immutable. Making all the fields readonly is a great way to help (1) document that the struct is immutable, and (2) prevent accidental mutations. However, there is one wrinkle, which actually in a strange coincidence I was planning on blogging about … Read more