System.Collections.Specialized.BitVector32.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString() { throw null; }
        public static string ToString(System.Collections.Specialized.BitVector32 value) { throw null; }

Same methods

BitVector32::ToString ( System value ) : string

Usage Example

        static void Main(string[] args)
        {
            /*
            BitVector32 answers = new BitVector32(-1);
            */
            // Creates and initializes a BitVector32 with all bit flags set to FALSE.
            BitVector32 myBV = new BitVector32(0);

            // Creates masks to isolate each of the first five bit flags.
            int myBit1 = BitVector32.CreateMask();
            int myBit2 = BitVector32.CreateMask(myBit1);
            int myBit3 = BitVector32.CreateMask(myBit2);
            int myBit4 = BitVector32.CreateMask(myBit3);
            int myBit5 = BitVector32.CreateMask(myBit4);

            // Sets the alternating bits to TRUE.
            Console.WriteLine("Setting alternating bits to TRUE:");
            Console.WriteLine("   Initial:         {0}", myBV.ToString());
            myBV[myBit1] = true;
            Console.WriteLine("   myBit1 = TRUE:   {0}", myBV.ToString());
            myBV[myBit3] = true;
            Console.WriteLine("   myBit3 = TRUE:   {0}", myBV.ToString());
            myBV[myBit5] = true;
            Console.WriteLine("   myBit5 = TRUE:   {0}", myBV.ToString());

            Console.ReadKey();
        }
All Usage Examples Of System.Collections.Specialized.BitVector32::ToString