-
Default Access Specifer
What is default access specifer of a class in C#? Is it internal or private?class foo{ int Var; }In the above code snippet. What is the default access specifier for the variable Var.
-
-
GetEnumerator( ) of Ienumerable interface returns
A) IenumeratorB) IcollectionC) Ienumerable
-
Which method is actually called ultimately when Console.WriteLine( ) is invoked
A) Append( )B) AppendFormat( )C) Tostring( )
-
-
Which of the following statements is not true for interfaces
A) Interface definitions does not have implementationB) Interfaces must be declared as publicC) Interfaces can be instantiatedD) Interface does not have constructorsExplanation: Interfaces can only be implemented by inheriting and they can not be instantiated
-
Sealed class can be inherited
A) TrueB) FalseExplanation: Sealed class cannot be inherited
-
By declaring a base class function as virtual we allow the function to be overridden in subclasses
A) TrueB) FalseExplanation: If a function is declared virtual it needs to be overridden in subclass