public int CompareTo(object obj) { ZListSubItem otherItem = obj as ZListSubItem; if (otherItem == null) { return(-1); } if (fValue is string && otherItem.fValue is string) { return(ZListView.StrCompareEx((string)fValue, (string)otherItem.fValue)); } IComparable cv1 = fValue as IComparable; IComparable cv2 = otherItem.fValue as IComparable; int compRes; if (cv1 != null && cv2 != null) { compRes = cv1.CompareTo(cv2); } else if (cv1 != null) { compRes = -1; } else if (cv2 != null) { compRes = 1; } else { compRes = 0; } return(compRes); }
public void AddSubItem(object itemValue) { ZListSubItem subItem = new ZListSubItem(itemValue); SubItems.Add(subItem); }