As the title says, I'm trying to take an item from one list of objects add it to another list and delete the item from the original list without it being deleted from my new list.
This is what I've tried so far:
_ToUpdateQnA.Add(_qnaPair[rowIndex]);
int delIndex = Int32.Parse((e.CommandArgument).ToString());
ListViewDataItem item = (e.CommandSource) as ListViewDataItem;
TextBox deletedQtn = (TextBox)item.FindControl("QuestionTb");
string delQtn = deletedQtn.Text;
_qnaPair[rowIndex].Questions[delIndex].delta_question_description = delQtn;
_qnaPair[rowIndex].DelQuestions.Add(delQtn);
_qnaPair[rowIndex].Questions[delIndex].status = "toDelete";
_qnaPair[rowIndex].Questions.RemoveAt(delIndex);
After this code runs, _ToUpdateQnA keeps the _qnaPair object however, deletes the '_qnaPair[rowIndex].Questions[delIndex]' which has now had it's status updated to "toDelete" which I'd like to remain in the _ToUpdateQnA List.
Questions is a list of objects within a QnAPair object.
Thanks I'm quite new at this.