private int SetRequiredElements(ClassDataContract contract, byte[] requiredElements)
            {
                int memberCount = (contract.BaseContract == null) ? 0 :
                                  SetRequiredElements(contract.BaseContract, requiredElements);
                List <DataMember> members = contract.Members;

                for (int i = 0; i < members.Count; i++, memberCount++)
                {
                    if (members[i].IsRequired)
                    {
                        BitFlagsGenerator.SetBit(requiredElements, memberCount);
                    }
                }
                return(memberCount);
            }
            private int SetRequiredElements(ClassDataContract contract, byte[] requiredElements)
            {
                int bitIndex = (contract.BaseContract == null) ? 0 : this.SetRequiredElements(contract.BaseContract, requiredElements);
                List <DataMember> members = contract.Members;
                int num2 = 0;

                while (num2 < members.Count)
                {
                    if (members[num2].IsRequired)
                    {
                        BitFlagsGenerator.SetBit(requiredElements, bitIndex);
                    }
                    num2++;
                    bitIndex++;
                }
                return(bitIndex);
            }