Author : Sree Krishna.S Email : [email protected] Please donot remove above comment. This class is used to compare any type(property) of a class. This class automatically fetches the type of the property and compares.
Наследование: IGenericComparer
Пример #1
0
        public virtual void Sort()
        {
            if (sortcolumn == "")
            {
                throw new Exception("Sort column required.");
            }
            if (SortObjectType == null)
            {
                throw new Exception("Sort object type required.");
            }
            IGenericComparer sorter = new GenericComparer();

            sorter.ObjectType   = sortObjectType;
            sorter.SortColumn   = sortcolumn;
            sorter.SortingOrder = (int)sortingOrder;
            InnerList.Sort(sorter);
        }
 public virtual void Sort()
 {
     if(sortcolumn == "") throw new Exception("Sort column required.");
     if(SortObjectType == null) throw new Exception("Sort object type required.");
     IGenericComparer sorter = new GenericComparer();
     sorter.ObjectType = sortObjectType;
     sorter.SortColumn = sortcolumn;
     sorter.SortingOrder = (int)sortingOrder;
     InnerList.Sort(sorter);
 }