BitArray.Clone Method (System.Collections)

Switch View :
ScriptFree
.NET Framework Class Library
BitArray.Clone Method

Creates a shallow copy of the BitArray.

Namespace:  System.Collections
Assembly:  mscorlib (in mscorlib.dll)
Syntax

Visual Basic
Public Function Clone As Object
C#
public Object Clone()
Visual C++
public:
virtual Object^ Clone() sealed
F#
abstract Clone : unit -> Object 
override Clone : unit -> Object 

Return Value

Type: System.Object
A shallow copy of the BitArray.

Implements

ICloneable.Clone()
Remarks

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.

This method is an O(n) operation, where n is Count.

Version Information

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Platforms

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
See Also

Reference