Hello all
I have some applicataion have some method , which loop through list of object using foreach , and inside the loop I add every object to the database , but in some cases some exception happend with some object in the list and the method catch the exception and doesnt complete the rest of the list of object, what I want is if some exception happend the with some object the looping complete with the other remaining objects my code is some thing like the following:
foreach(Product obj in lstProduct)
{
try
{
obj.Add();
}
catch(Exceprion ex)
{
string Err = ex.Message;
}
}
,please if any body get what I want and can help me please send me or tell me about some URL may help me in doing that