Swapnil Mache

Swapnil Mache

  • NA
  • 56
  • 4.1k

ERROR "Control can not leave body of finally clause"

Jun 4 2016 6:19 AM
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace test2
{
public class a
{
public int m1()
{
try
{
return 10;
}
catch (Exception e)
{
return 20;
}
finally
{
return 30;
}
}
}
class Program
{
public static void Main(string[] args)
{
a A = new a();
int i = A.m1();
// S.O.P(i);
Console.WriteLine("" + i);
Console.ReadLine();
}
}
}

Answers (2)