コード例 #1
0
        public static string CreateBitMask(int maxBits = kDefaultSize, bool defaultBitValue = false)
        {
            // Creates a new bitmask with all bits set to defaultBitValue.
            var t = new BitMask(maxBits, defaultBitValue);

            return(t.ToString());
        }
コード例 #2
0
        public static string CreateBitMask2(int bitPos, bool bitValue, string base64String)
        {
            // Create a new bitmask with one bit changed.
            // bitPos = bit position in the base64String to set. zero based.
            var t = new BitMask(base64String);

            t.SetBit(bitPos, bitValue);
            return(t.ToString());
        }