public int CompareTo(object obj) { if (obj == null) { return(1); } ICustomString otherstring = obj as ICustomString; return(this.Length().CompareTo(otherstring.Length())); }
public void addToList(ICustomString customObject) { int length = customObject.length(); ListofCustomStringObjects.Add(length,customObject); }
public void AddToList(ICustomString customString) { sortedStringList.Add(customString.Length(), customString); }