Use cases for boxing a value type in C#?

后端 未结 9 1124
既然无缘
既然无缘 2021-02-05 23:36

There are cases when an instance of a value type needs to be treated as an instance of a reference type. For situations like this, a value

9条回答
  •  鱼传尺愫
    2021-02-06 00:11

    One example would when a method takes an object parameter and a value type must be passed in.

提交回复
热议问题