Csharp.Net output type question
Q. Trace the output
namespace A
{
class MyClass
{
public void fun()
{
Console.WriteLine("C # is fun");
}
}
namespace B
{
class MyClass
{
public void fun()
{
Console.WriteLine("C # is interesting");
}
}
}
}
Consider the above code what will be the output of following program
class Program
{
static void Main(string[] args)
{
A.MyClass obj = new A.MyClass();
obj.fun();
}
}
- Published on 31 Aug 15a. C # is interesting
b. C # is fun
c. cmpile time error
d. None of the above
ANSWER: C # is fun