Home / C# Programming / Constructors :: Discussion

Discussion :: Constructors

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

    namespace FreshergateConsoleApplication {      class Sample  
           {       
               static Sample()      
               {              
                   
              Console.Write("Sampleclasn");         
               }      
              public static void GATE1()           
              {             
              Console.Write("GATE1 method ");         
              }   
          }      
           class MyProgram   
         {         
           static void Main(string[ ] args)         
           {          
              Sample.GATE1();    
          }    
       }  
    }
    

  2. A.

    Sample class Gate1 method

    B.

    Gate1 method

    C.

    Sample class

    D.

    Gate1 method Sample class

    E.

    Sample class Sample class

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    No answer description available for this question.


Be The First To Comment