Refresher/csharp/Accessibility Modifiers


Accessibility Modifiers    
 Class inheritance: colon + base class
 Private class-level variables: inherited but not accessible
 Value: keyword for implicit input name of the set method in object classes
 Protected class-level variables: available to classes in the same namespace
 Protected internal: available to derived classes, and classes within the same Assembly, and the base class
 Default constructor: disappears when any constructor is written
 System.Object: top .NET class that everything is derived from
 Method overriding: changing the method behavior for a derived class
 Method overloading: using the same method name again in the same class but with different number, type and order of parameters
 Virtual method: can be over-ridden but cannot change method signature
 Method signature: its name and the number and type of its parameters, where the last parameter may comprise of an array of values
 Sealed class (in Java, final class): cannot be inherited
 Sealed method: method cannot be inherited but class can when not sealed
 Abstract class (in C++, pure virtual method): blueprint for a class without any implementation and thus cannot be instantiated
 Abstract class methods: not all must be abstract, some can be concrete
 Abstract class required when at least one of the methods in the class is abstract
 Abstract method: require non-abstract derived classes to provide their own implementation of this method
 Interface class? an abstract class with public abstract methods all of which must be implemented in the inherited classes
 Interface class methods: all must be abstract and public and thus accessibility modifiers not needed
 Multiple interfaces: can be inherited
 Namespace class: classes are declared inside a namespace