what is the difference between a sealed class and a static class?
- A sealed class is a c# class which can't be derived by another c# class. sealed modifier is used to mark the class as a sealed class.
- A sealed class can be instantiated, but can't be inherited.
- A static class is a c# class which comprises of only static methods and members. The members of a static class are initialized at some random time before any member or method of it is first called.
- A static class can't be instantiated and also inherited, because it's marked static.
Posted Mar 30, 2021