C# Class System.Collections.BitArray

Inheritance: ICollection, ICloneable
Afficher le fichier Open project: dotnet/corefx Class Usage Examples

Méthodes publiques

Méthode Description
And ( BitArray value ) : BitArray
BitArray ( BitArray bits ) : System.Diagnostics
BitArray ( bool values ) : System.Diagnostics
BitArray ( byte bytes ) : System.Diagnostics
BitArray ( int length ) : System.Diagnostics
BitArray ( int length, bool defaultValue ) : System.Diagnostics
Clone ( ) : object
CopyTo ( Array array, int index ) : void
Get ( int index ) : bool
GetEnumerator ( ) : IEnumerator
Not ( ) : BitArray
Or ( BitArray value ) : BitArray
Set ( int index, bool value ) : void
SetAll ( bool value ) : void
Xor ( BitArray value ) : BitArray
this ( int index ) : bool

Private Methods

Méthode Description
BitArray ( ) : System.Diagnostics
GetArrayLength ( int n, int div ) : int

Used for conversion between different representations of bit array. Returns (n+(div-1))/div, rearranged to avoid arithmetic overflow. For example, in the bit to int case, the straightforward calc would be (n+31)/32, but that would cause overflow. So instead it's rearranged to ((n-1)/32) + 1, with special casing for 0. Usage: GetArrayLength(77, BitsPerInt32): returns how many ints must be allocated to store 77 bits.

Method Details

And() public méthode

public And ( BitArray value ) : BitArray
value BitArray
Résultat BitArray

BitArray() public méthode

public BitArray ( BitArray bits ) : System.Diagnostics
bits BitArray
Résultat System.Diagnostics

BitArray() public méthode

public BitArray ( bool values ) : System.Diagnostics
values bool
Résultat System.Diagnostics

BitArray() public méthode

public BitArray ( byte bytes ) : System.Diagnostics
bytes byte
Résultat System.Diagnostics

BitArray() public méthode

public BitArray ( int length ) : System.Diagnostics
length int
Résultat System.Diagnostics

BitArray() public méthode

public BitArray ( int length, bool defaultValue ) : System.Diagnostics
length int
defaultValue bool
Résultat System.Diagnostics

Clone() public méthode

public Clone ( ) : object
Résultat object

CopyTo() public méthode

public CopyTo ( Array array, int index ) : void
array Array
index int
Résultat void

Get() public méthode

public Get ( int index ) : bool
index int
Résultat bool

GetEnumerator() public méthode

public GetEnumerator ( ) : IEnumerator
Résultat IEnumerator

Not() public méthode

public Not ( ) : BitArray
Résultat BitArray

Or() public méthode

public Or ( BitArray value ) : BitArray
value BitArray
Résultat BitArray

Set() public méthode

public Set ( int index, bool value ) : void
index int
value bool
Résultat void

SetAll() public méthode

public SetAll ( bool value ) : void
value bool
Résultat void

Xor() public méthode

public Xor ( BitArray value ) : BitArray
value BitArray
Résultat BitArray

this() public méthode

public this ( int index ) : bool
index int
Résultat bool