Пример #1
0
        /// <summary>
        /// Determines whether the <paramref name="index"/>th bit is set in <paramref name="value"/>
        /// </summary>
        public static bool GetBit(this sbyte value, int index)
        {
            if ((index & ~(SizeOfSByteInBits - 1)) != 0)
            {
                ThrowIndexOutOfRange();
            }

            return(value.HasAnyFlag((sbyte)(((sbyte)1) << index)));
        }