BitArray.Get Method (Int32)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the value of the bit at a specific position in the BitArray.

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

member Get : 
        index:int -> bool

Parameters

index
Type: System.Int32

The zero-based index of the value to get.

Return Value

Type: System.Boolean

The value of the bit at position index.

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 8
.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: