BitArray.And Method (BitArray)

 
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.

Performs the bitwise AND operation between the elements of the current BitArray object and the corresponding elements in the specified array. The current BitArray object will be modified to store the result of the bitwise AND operation.

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

member And : 
        value:BitArray -> BitArray

Parameters

value
Type: System.Collections.BitArray

The array with which to perform the bitwise AND operation.

Return Value

Type: System.Collections.BitArray

An array containing the result of the bitwise AND operation, which is a reference to the current BitArray object.

Exception Condition
ArgumentNullException

value is null.

ArgumentException

value and the current BitArray do not have the same number of elements.

The bitwise AND operation returns true if both operands are true, and returns false if one or both operands are false.

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

The following code example shows how to perform the bitwise AND operation between two BitArray objects.

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: