Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
What are the differences between a static and a non-static class in C#?
The following is the difference between a static and non-static class −
Non-static classes can be instantiated, whereas static classes cannot be instantiated i.e. you cannot use the new keyword to create a variable of the class type
Static classes can only have static methods.
Non-static classes can have instance method and static methods.
ou access the members of a static class by using the class name itself
Static class is sealed.
Example of static class −
public static class Calculate
Example of non-static class −
public class Calculate
Advertisements
