What would be the output of following code snippet?
Namespace Outer
{
Using System;
Class Math
{
}
}
Namespace Outer.Inner
{
Class Foo
{
Public static double Bar()
{
Return Math.PI;
}
}
Class program
{
Public static void Main()
{
Console.WriteLine(“Value of PI is; “ + Foo.Bar() .ToString());
}
}
}
Correct Answer: It will give a compile time error.
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More C# MCQ Questions