BitArray Constructor (Int32, Boolean)

BitArray Constructor (Int32, Boolean)

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Initializes a new instance of the BitArray class that can hold the specified number of bit values, which are initially set to the specified value.

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

public BitArray(
	int length,
	bool defaultValue
)

Parameters

length
Type: System.Int32
The number of bit values in the new BitArray.
defaultValue
Type: System.Boolean
The Boolean value to assign to each bit.

ExceptionCondition
ArgumentOutOfRangeException

length is less than zero.

This constructor is an O(n) operation, where n is length.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft