/// <summary> /// True iff the given type exists in the bitmap. /// </summary> public bool IsTypePresentForOwner(DnsType dnsType) { if (dnsType >= MaxTypeBitmapDnsType) { throw new ArgumentOutOfRangeException("dnsType", dnsType, string.Format(CultureInfo.InvariantCulture, "Cannot be bigger than {0}.", MaxTypeBitmapDnsType)); } int byteOffset; byte mask; DnsTypeToByteOffsetAndMask(out byteOffset, out mask, dnsType); if (byteOffset > TypeBitmap.Length) { return(false); } return(TypeBitmap.ReadBool(byteOffset, mask)); }