对值类型进行装箱将创建一个对象并将指定的值类型的字段浅表复制到新对象中。
Boxing a value type creates an object and performs a shallow copy of the fields of the specified value type into the new object.
如果对象包含对其他对象的引用,则浅表复制不创建所引用对象的副本,而是仅复制对原始对象的引用。
If the object contains references to other objects, the shallow copy does not create copies of the referred objects; instead, it copies only the references to the original objects.
如果分配的值是可变值类,则该方法返回该类的浅表副本,因为值类拥有复制语义。
If the value being assigned is a mutable value class, the method returns a shallow copy of the class, because value classes have copy semantics.
应用推荐