public GenericListComparer(string sortFieldName)
            {
                this._sortFieldName = sortFieldName;

                // default to ascending order
                this._sortDirection = CollectionSortDirection.Ascending;
            }
 /// <summary>
 /// this method is available to Sort the List by the Sort direction defined.
 /// </summary>
 /// <param name="sortByField"></param>
 /// <param name="sortDirection"></param>
 public void Sort(string sortByField,
                  CollectionSortDirection sortDirection)
 {
     try
     {
         GenericListComparer comparer = new GenericListComparer(sortByField, sortDirection);
         this.Sort(comparer);
     }
     catch (Exception err)
     {
         string desc = err.Message;
     }
 }
 public GenericListComparer(string sortFieldName,
                            CollectionSortDirection sortDirection)
 {
     this._sortFieldName = sortFieldName;
     this._sortDirection = sortDirection;
 }