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 modifier

Comments

new

Only applicable for nested (inner) classes “ Non-nested classes cannot have a new modifier (see section 6.9)

abstract

Makes the class an abstract class (see section 6.8)

sealed

Makes the class a sealed class “ a sealed class is a final class in Java-speak (see section 6.7)

public

Access modifiers “ modify the accessibility of the class (see section 8.1)

protected

internal

private



From Java to C#. A Developers Guide
From Java to C#: A Developers Guide
ISBN: 0321136225
EAN: 2147483647
Year: 2003
Pages: 221
Authors: Heng Ngee Mok

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net