two catch statements Example

Sabarimahesh
Posted by Sabarimahesh under C# category on | Points: 40 | Views : 1100
static void Main()
{
try
{
string str = null;
ProcessString(str );
}

catch (ArgumentNullException e)
{
Console.WriteLine("{0} 1St", e);
}

catch (Exception e)
{
Console.WriteLine("{0}2nd", e);
}
}

Comments or Responses

Login to post response