/// <summary> /// Matches this full name with the name provided as a parameter. /// </summary> /// <param name="compareTo">A name to compare with.</param> /// <returns>true, if the names match, otherwise false.</returns> public bool Matches(X500Name compareTo) { if (compareTo == null) throw new ArgumentNullException("compareTo"); //iterate through the individual parts, starting at the terminal RDN for (int i = 0; i < _parts.Count; i++) { if (!((X500RDN)_parts[i]).Equals(((X500RDN)compareTo._parts[i]))) { return false; } } return true; }