.


:




:

































 

 

 

 


, BitArray .




public bool this[int index] { get; set; }

. BitArray.

// BitArray.

Using System;

Using System.Collections;

class BADemo {

Public static void ShowBits(string rem,

BitArray bits) {

Console.WriteLine(rem);

for(int i=0; i < bits.Count; i++)

Console.Write("{0, -6} ", bits[i]);

Console.WriteLine ("\n");

}

static void Main() {

BitArray ba = new BitArray(8); byte[] b = { 67 };

BitArray ba2 = new BitArray(b);

ShowBits(" :", ); ba = .Not ();

ShowBits(" NOT:", );

ShowBits(" 2:", 2);

BitArray = .(2);

ShowBits(" ba XOR 2:", );

}

}

.

:

False False False False False False False False ba NOT:

True True True True True True True True ba2:

True True False False False False?True False ba XOR ba2:

False False True True True True False True

 

.NET Framework , . System. Collections. Specialized .

 

 

 

CollectionsUtil

 

 

HybridDictionary

 

, - ListDictionary. Hashtable

 

ListDictionary

 

, -" .

 

NameValueCollection

 

, -, , string

 

OrderedDictionary

 

, -

 

StringCollection

 

,

 

StringDictionary

 

-, -, ,

String

 

, System. Collections : CollectionBase, ReadOnlyCollectionBase DictionaryBase. .

Collections API , . System. Collections. Generic. , , . , LinkedList , . , . , ArrayList List, HashTable Dictionary. , . , , .

, , -, , . , , . , , . , , .





:


: 2016-12-03; !; : 353 |


:

:

,
==> ...

958 - | 872 -


© 2015-2024 lektsii.org - -

: 0.014 .