What will happen,if we compile below code in C#?

private int sum(int a, int b)
{
try
{
}
catch (Exception ex)
{
throw ex;
}
}

 Posted by vishalneeraj-24503 on 11/28/2013 | Category: C# Interview questions | Views: 5132 | Points: 40
Select from following answers:
  1. Compile Successfully.
  2. Throw an error at compile time :- not all code paths return a value
  3. Throw an error at run time :- not all code paths return a value
  4. All Above

Show Correct Answer


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response