What does immutable and readonly mean in C#?

前端 未结 8 1021
我寻月下人不归
我寻月下人不归 2021-02-13 09:44

Is it correct that it is not possible to change the value of an immutable object?

I have two scenarios regarding readonly that I want to understand:

8条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-13 10:14

    1. Yes.
    2. Readonly doesn't equal to immutable. You can still call _metadata.Change.

提交回复
热议问题