コード例 #1
0
        public void GetBit()
        {
            string AsString;
            bool   IsBitSet;

            using mpz_t a = new mpz_t("A000000000000000000200000000001", 16);
            AsString      = a.ToString(16).ToUpper();
            Assert.AreEqual("A000000000000000000200000000001", AsString);

            IsBitSet = a.GetBit(45);
            Assert.IsTrue(IsBitSet);

            IsBitSet = a.GetBit(46);
            Assert.IsFalse(IsBitSet);
        }