What will be the result of a following code execution?
 
class Program 
{ 
    static void Main(string[] args) 
    { 
     Console.WriteLine(Foo("Original string")); 
    } 

    public static string Foo(string str) 
    { 
            try 
            { 
                       return str;
            } 
            finally 
            { 
                  Console.WriteLine("In finally"); 
                  str = "Somewhere in finally"; 
             } 
        } 
 }
 

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes