Enlist the different types of classes in C#.

devquora
devquora

Posted On: Feb 22, 2018

 

The four types of classes in C# are:

  • Partial class: Allows its associates to be separated or shared with different.cs documents. It is indicated by the keyword “Partial”.
  • Sealed class: It is a class, which cannot be acquired. To get to the member from a fixed class, we have to make the object of the class. It is indicated by the keyword “Sealed”.
  • Abstract class: It is a class where the object cannot be instantiated. This class can be acquired; however, it should have at least one technique. It is indicated by the keyword “conceptual”.
  • Static class: It is a class, which does not permit legacy. The members of the class are additionally static. It is indicated by the keyword “static”. This keyword advises the compiler to check for any unplanned instances in the static class.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    C# Interview Questions

    What is C#?

    C# is a programming language which is object-oriented developed by Microsoft...

    C# Interview Questions

    Define a class and an object.

    A class is an example of properties and techniques that utilize and characterize a continuous substance...

    C# Interview Questions

    List the fundamental OOP concepts.

    The fundamentals of an OOP concept are:..