Friday, 16 December 2011

58.What will be the output of the C#.NET code snippet given below?

namespace IndiabixConsoleApplication
{
    class Sample
    {
        static Sample()
        {
            Console.WriteLine("Sample class");
        }
        public static void Bix1()
        {
            Console.WriteLine("Bix1 method");
        }
    }
    class MyProgram
    {
        static void Main(string[ ] args)
        {
            Sample.Bix1();
        }
    }
}
A.Sample class Bix1 method
B.Bix1 method
C.Sample class
D.Bix1 method Sample class
E.Sample class Sample class
Answer: Option A