private static void Write(DnsQuestionCollection collection, IDnsWriter writer) { if (collection != null) { collection.Write(writer); } }
/// <summary> /// Returns a value indicating if the two collections are considered equal. /// </summary> /// <param name="left">The first collection.</param> /// <param name="right">The second collection.</param> /// <returns><see langword="true"/> if the collections are considered equal, /// otherwise; <see langword="false"/>.</returns> public static bool Equals(DnsQuestionCollection left, DnsQuestionCollection right) { if (left == right) { return(true); } if (left == null || right == null) { return(false); } if (left.Count != right.Count) { return(false); } for (int i = 0; i < left.Count; ++i) { if (!left[i].Equals(right[i])) { return(false); } } return(true); }