Created
October 29, 2017 19:18
-
-
Save Fhernd/db2e8e46723614245cfbdc7288a47915 to your computer and use it in GitHub Desktop.
Demostración de uso de la clase BitArray.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
namespace cap07.colecciones | |
{ | |
class EjemploBitArray | |
{ | |
public static void Main() | |
{ | |
var bits = new BitArray(2); | |
// bits[0] == false | |
// bits[1] == false | |
bits[1] = true; | |
// bits[0] == false | |
// bits[1] == true | |
bits.And(bits); | |
// bits[0] == false | |
// bits[1] == true | |
Console.WriteLine(bits[0]); | |
Console.WriteLine(bits[1]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment