(2010-08-02) C#.NET 位元運算

摘要:(2010-08-02) C#.NET 位元運算

 2010-08-02.rar

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace mod02
{
    class TestBit
    {
        public static void Main()
        {
            System.Collections.BitArray bit = new System.Collections.BitArray(3);
            bit[0] = true;
            bit[1] = false;
            bit[2] = true;
            System.Collections.BitArray bit2 = new System.Collections.BitArray(3);
            bit2[0] = false;
            bit2[1] = false;
            bit2[2] = false;
            System.Collections.BitArray r = bit.Or(bit2);
            foreach (Boolean b in r)
            {
                System.Console.WriteLine(b.ToString());

            }
            

        }
    }
}