BitArray.Clone 方法

定义

创建 BitArray 的浅表副本。Creates a shallow copy of the BitArray.

public:
 virtual System::Object ^ Clone();
public object Clone ();
abstract member Clone : unit -> obj
override this.Clone : unit -> obj
Public Function Clone () As Object

返回

Object

BitArray 的浅表副本。A shallow copy of the BitArray.

实现

注解

集合的浅表副本仅复制集合的元素,无论它们是引用类型还是值类型,但不复制引用引用的对象。A shallow copy of a collection copies only the elements of the collection, whether they are reference types or value types, but it does not copy the objects that the references refer to. 新集合中的引用指向原始集合中的引用所指向的相同对象。The references in the new collection point to the same objects that the references in the original collection point to.

与此相反,集合的深层副本会复制元素以及元素直接或间接引用的所有内容。In contrast, a deep copy of a collection copies the elements and everything directly or indirectly referenced by the elements.

此方法是一个 O(n) 操作,其中 nCountThis method is an O(n) operation, where n is Count.

适用于