How to continue after exception occurred in C#
- by Manisha
static string SomeMethodThatMightThrow(string s)
{
if (s[4] == 'C')
throw new InvalidOperationException();
return @"C:\newFolder\" + s;
}
static void Main(string[] args)
{
string[] files = { "fileA.txt", "B.txC", "fileC.txt","fileD.txt" };
var exceptionDemoQuery =
from…