|
Rate question difficulty level
|
2
|
1 Votes
|
what will be the output of the following Code?
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(ok());
Response.Write("
");
Response.Write(fail());
}
private string ok()
{
string x;
try
{
x = "some string";
return x;
}
catch
{
}
finally
{
x = "finally";
}
return x;
}
private string fail()
{
string x;
try
{
x = "some string";
throw new Exception();
//return x;
}
catch
{
}
finally
{
x = "finally";
}
return x;
}
A. some string,some string
B. some string,finally
C. some string,finally,some string
D. some string,finally,finally