C Sharp Interview Questions and Answers - 4
Question: 16
What is an ArrayList?
The ArrayList object is a collection of items containing a single data type values.
Question: 17
What is Enums in C#?
Enums or Enumerators are used to declare a set of related constants (default start with 0); they are only available with primitive data types like int and short etc.
Question: 18
What do you mean by boxing and un-boxing?
C# provides us with Value types and Reference Types. Value Types are stored on the stack and Reference types are stored on the heap. The conversion of value type to reference type is known as boxing and converting reference type back to the value type is known as un-boxing.
e.g.
int x = 10;
object o = x ; // Implicit boxing
object o = (object) x; // Explicit Boxing
x = o; // Implicit Un-Boxing
x = (int)o; // Explicit Un-Boxing
Question: 19
What is a Static class? What are its features?
Static class is a class which can be used or accessed without creating an instance of the class.
Important Features:
Static class only contains static members and a private constructor.
Static class cannot be instantiated.
Static classes are sealed by default and therefore cannot be inherited.
Question: 20
What is sealed class? What are its features?
Sealed classes are those classes which can not be inherited and thus any sealed class member can not be derived in any other class.
A sealed class cannot also be an abstract class.
In C# structs are implicitly sealed; therefore, they cannot be inherited.
- C# Interview Questions and Answers for Freshers
- C# Interview Questions for Experienced Professionals
- C# Interview Questions and Answers for Experienced
- C# Interview Questions with Answers Pdf
- C Sharp Interview Questions and Answers
- C Sharp Interview Questions and Answers for Freshers Pdf
- Top 200+ Advanced C# Interview Questions 2019-2020
- C# Programming Online Test Questions and Answers
- C# Algorithm Interview Questions and Answers
Agricultural Structural and Environmental Control MCQ Quiz More
Science Solutions Class 10 Important Questions and Answers More
Science Solutions Class 10 Important Questions and Answers More
Samacheer Kalvi 10th Science Solutions Questions & Answers More
Samacheer Kalvi 10th Science Carbon and Its Compounds Questions More
TNPSC History Online Test in Tamil and English 2019-2020 More
1,000+ Tamil Nadu General Knowledge Questions & Answers 2020-21 More
1000+ Heat Engines Objective Questions and Answers Pdf More
ECE Interview Questions and Answers Pdf More
100+ Hard Chemistry Questions and Answers More