What should be the output of this program?
public class Example
        {
            public static Example()
            {
            }
            public static void Show()
            {
                Console.WriteLine("Oops "); 
            }
        }
        static void Main()
        {
            Example obj = new Example(); 
        }
This program will not compile because we have used access specifier with static constructor.
 
No comments:
Post a Comment