public static boolean allSubsetsEqual(Collection<BitSet> altsets) {Iterator<BitSet> it = altsets.iterator();BitSet first = it.next();while ( it.hasNext() ) {BitSet next = it.next();if ( !next.equals(first) ) return false;}return true;}

public static bool AllSubsetsEqual(IEnumerable<BitSet> altsets){IEnumerator<BitSet> it = altsets.GetEnumerator();it.MoveNext();BitSet first = it.Current;while (it.MoveNext()){BitSet next = it.Current;if (!next.Equals(first)){return false;}}return true;}
