An enum has default modifier as public A class has default modifiers as Internal . It can declare members (methods etc) with following access modifiers: public internal private protected internal An interface has default modifier as public A struct has default modifier as Internal and it can declare its members (methods etc) with following access modifiers: public internal private A methods, fields, and properties has default access modifier as "Private" if no modifier is specified. |
This pointer is a pointer which points to the current object of a class. this is actually a keyword which is used as a pointer which differentiate the current object with global object. |
What is Abstract Class?Posted by: PosterAbstract class is a class that can not be instantiated, it exists extensively for inheritance and it must be inherited. There are scenarios in which it is useful to define classes that is not intended to instantiate; because such classes normally are used as base-classes in inheritance hierarchies, we call such classes abstract classes. Abstract classes cannot be used to instantiate objects; because abstract classes are incomplete, it may contain only definition of the properties or methods and derived classes that inherit this implements it's properties or methods. Static, Value Types & interface doesn't support abstract modifiers. Static members cannot be abstract. Classes with abstract member must also be abstract. |
OOPS Interview Questions
Default Access modifiers in C#?
Subscribe to:
Posts (Atom)