System.Xml.BitStack.PeekBit C# (CSharp) Méthode

PeekBit() public méthode

Return the top bit on the stack without pushing or popping.
public PeekBit ( ) : bool
Résultat bool
        public bool PeekBit() {
            Debug.Assert(this.curr != 0x1, "Stack empty");
            return (this.curr & 0x1) != 0;
        }

Usage Example

Exemple #1
0
        //-----------------------------------------------
        // Helper methods
        //-----------------------------------------------

        /// <summary>
        /// Write CData text if element is a CData element.  Return true if text should be written
        /// within a CData section.
        /// </summary>
        private bool StartCDataSection()
        {
            Debug.Assert(!_inCDataSection);
            if (_lookupCDataElems != null && _bitsCData.PeekBit())
            {
                _inCDataSection = true;
                return(true);
            }
            return(false);
        }