The ListItems has one item which always gives type mismatch exception. The code line 'MyItem items in ListItems' cause the exception to raise as there is some type mismatch between Listitems and MyItem. How do I ignore the type mismatch exception and move to the next element. If it would enter inside the foreach loop, I could have used the 'continue'. But the code does not even enter the for each loop
foreach (MyItem items in ListItems)
{
...Do...
}