System.Collections.Specialized.BitVector32.CreateMask Method

Creates the first mask in a series of masks that can be used to retrieve individual bits in a System.Collections.Specialized.BitVector32 that is set up as bit flags.

Syntax

public static int CreateMask ()

Returns

A mask that isolates the first bit flag in the System.Collections.Specialized.BitVector32.

Remarks

Use CreateMask() to create the first mask in a series and CreateMask(int) for all subsequent masks.

Multiple masks can be created to refer to the same bit flag.

The resulting mask isolates only one bit flag in the System.Collections.Specialized.BitVector32. You can combine masks using the bitwise OR operation to create a mask that isolates multiple bit flags in the System.Collections.Specialized.BitVector32.

Using a mask on a System.Collections.Specialized.BitVector32 that is set up as sections might cause unexpected results.

This method is an O(1) operation.

Requirements

Namespace: System.Collections.Specialized
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0