I have a list and I want to change one item for another
it seems I can't use tmp = obj because it is a foreach;Code:public void ActualizarProduto(Produto obj) { foreach (Produto tmp in ListProdutos) { if (obj.Text == tmp.Text) { tmp = obj; return; } } }
(btw: it will only find one result - there is only on item with same text)
If you have any ideia, it would be very helpfulthank you in advance




thank you in advance
Reply With Quote