public DocRecord[] GetDocs() { DocRecord[] dr = new DocRecord[docs.Count]; int cursor = 0; IDictionaryEnumerator en = titles.GetEnumerator(); while (en.MoveNext()) { dr[cursor++] = new DocRecord(Convert.ToInt32(en.Key), en.Value.ToString()); } Array.Sort(dr); return(dr); }
public int CompareTo(object o) { DocRecord dr = (DocRecord)o; return(title.CompareTo(dr.Title)); }