Set Method
Collapse the table of content
Expand the table of content

BitArray.Set Method (Int32, Boolean)

 

Sets the bit at a specific position in the BitArray to the specified value.

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

member Set : 
        index:int *
        value:bool -> unit

Parameters

index
Type: System.Int32

The zero-based index of the bit to set.

value
Type: System.Boolean

The Boolean value to assign to the bit.

Exception Condition
ArgumentOutOfRangeException

index is less than zero.

-or-

index is greater than or equal to the number of elements in the BitArray.

This method is an O(1) operation.

The following code example shows how to set and get specific elements in a BitArray.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft