Example #1
0
 /// <summary>
 /// Find a tasklist by ID and then return its index 
 /// </summary>
 /// <param name="observableCollection"></param>
 /// <param name="taskList"></param>
 /// <returns></returns>
 private int IndexOf(ObservableCollection<TaskList> lists, TaskList taskList)
 {
     try
     {
         TaskList taskListRef = lists.Single(tl => tl.ID == taskList.ID);
         return lists.IndexOf(taskListRef);
     }
     catch (Exception)
     {
         return -1;
     }
 }