System.Xml.Schema.BitSet.Get C# (CSharp) Method

Get() public method

public Get ( int index ) : bool
index int
return bool
        public bool Get(int index) {
            bool fResult = false;
            if (index < count) {
                int nBitSlot = Subscript(index);
                fResult = ((bits[nBitSlot] & (1 << (index & bitSlotMask))) != 0);
            }
            return fResult;
        }

Usage Example

 private void CheckDeterministic(BitSet set, int t, ValidationEventHandler eventHandler)
 {
     nodeTable.Clear();
     for (int i = 0; i < t; i++)
     {
         if (set.Get(i))
         {
             XmlQualifiedName n = ((TerminalNode)terminalNodes[i]).Name;
             if (!n.IsEmpty)
             {
                 if (nodeTable[n] == null)
                 {
                     nodeTable.Add(n, n);
                 }
                 else
                 {
                     if (eventHandler != null)
                     {
                         eventHandler(this, new ValidationEventArgs(new XmlSchemaException(Res.Sch_NonDeterministic, n.ToString())));
                     }
                     else
                     {
                         throw new XmlSchemaException(Res.Sch_NonDeterministic, n.ToString());
                     }
                 }
             }
         }
     }
 }
All Usage Examples Of System.Xml.Schema.BitSet::Get