2019-05-27から1日間の記事一覧

可変型のフィールドにreadonlyをつけてはいけないのか?

C#

X DO NOT assign instances of mutable types to readonly fields. A mutable type is a type with instances that can be modified after they are instantiated. For example, arrays, most collections, and streams are mutable types, but System.Int32…