Keyword: Internal & Public, Abstract & Sealed

Internal & Public

In C#, once we defined a class and we can instantiate it anywhere else in our project that has access to the definition.

By default, classes are declared as internal. With internal, it means the class is only accessible to the code in our current project. On contrast, keyword public allows classes to be accessible to code in other projects.

Abstract & Sealed

A class with abstract keyword, cannot be instantiated, but only inherited.

A class with sealed keyword, cannot be inherited.

1 Reply to “Keyword: Internal & Public, Abstract & Sealed”

Leave a Reply

Your email address will not be published. Required fields are marked *