Apidays New York 2024 - The value of a flexible API Management solution for O...
OOPs reasoning faqs- 2
1. OOPs Reasoning FAQs-2
S.No Questions Answers
1 Can you create an instance of a No, we cannot create an instance of a
static class ? static class.
2 Are Value types sealed ? Yes, Value types are sealed.
3 Can a static class contain non No, a static class can contain only static
static members? members
4 Can a struct inherit from another No, a struct cannot inherit from another
struct or class in C#? struct or class, and it cannot be the
base of a class.
5 Can you instantiate a struct Yes, we can instantiate a struct without
without using a new operator in using a new operator
C#?
6 Can a struct have a default No
constructor (a constructor without
parameters) or a destructor in C#?
7 Do structs support inheritance? No, structs do not support inheritance,
but they can implement interfaces.
8 Can a sealed class be used as a No, sealed class cannot be used as a
base class? base class. A compile time error will be
generated.
9 Can you create an instance of an No, abstract classes are incomplete and
abstract class? you cannot create an instance of an
abstract class.
10 Can destructors have access No, destructors cannot have access
modifiers? modifiers.
And, further updates on dotnet reasoning questions and answers, please visit my
blog @ http://onlythinkandanswerfaqs.blogspot.in/