MCQs > IT & Programming > C# > 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()); } } }

C# MCQs

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());

}

}

}

Answer

Correct Answer: It will give a compile time error.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C# Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it