my listbox1 is populated with the names of the lists i have created which when a name is selected populate listbox2 with a list objects from that list that is already created. Then when an item from listbox2 is selected it populates textboxes with the different elements of that object.
I have a delete button and when clicked i want to delete the current object from the list named in listbox1. How do i do that? This is what i've tried.
this does not work. it gives me an error:
CS1061. 'char' does not contain a definition for 'requestDesc' and no extension method 'requestDesc' accepting a first argument of type 'char' could be found (are you missing a using directive or an assembly reference?)
I have everything else working but this.
string selecItem = listBox2.GetItemText(listBox2.SelectedItem);
var find2 = selecItem.FirstOrDefault(x => x.requestDesc == curItem);
if (find2 != null)
{
selecItem.Remove(find2);
}