O'Reilly logo

From Java to C#: A Developer's Guide by Heng Ngee Mok

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.1. Class modifiers

A C# class can have the modifiers listed in Table 6.1.

Table 6.1. Valid class modifiers in C#
Class modifierComments
newOnly applicable for nested (inner) classes – Non-nested classes cannot have a new modifier (see section 6.9)
abstractMakes the class an abstract class (see section 6.8)
sealedMakes the class a sealed class – a sealed class is a final class in Java-speak (see section 6.7)
publicAccess modifiers – modify the accessibility of the class (see section 8.1)
protected
internal
private

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required