Can we declare non-static method inside static classes?

 Posted by vishalneeraj-24503 on 1/23/2014 | Category: C# Interview questions | Views: 659 | Points: 40
Answer:

NO,we can not use non-static methods inside static class.Because as we know that all the methods,variables defined inside static class must be static.If we write non-static method,then it will give compile-time error.For static class,everything must be declared as static.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response