Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What are the different types of classes in C#?
Home
Dot Net
What are the different types of classes in C#?
+1
vote
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
What are the different types of classes in C#?
#dotnet
#chash
#basicchash
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jun 25, 2019
by
Venkatshastri
Partial class
– Allows its members to be divided or shared with multiple .cs files. It is denoted by the keyword
Partial.
Sealed class
– It is a class which cannot be inherited. To access the members of a sealed class, we need to create the object of the class. It is denoted by the keyword
Sealed
.
Abstract class
– It is a class whose object cannot be instantiated. The class can only be inherited. It should contain at least one method. It is denoted by the keyword
abstract.
Static class
– It is a class which does not allow inheritance. The members of the class are also static. It is denoted by the keyword
static
. This keyword tells the compiler to check for any accidental instances of the static class.
Related questions
+1
vote
Q: What are sealed classes in C#?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#chash
#dotnet
#basicchash
+1
vote
Q: What are the different types of Delegates?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicchash
#basicc#
+1
vote
Q: What are C# attributes and its significance?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicchash
#c#
+1
vote
Q: What are generics in C#.NET?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicchash
#c#
+1
vote
Q: What is Reflection in C#?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#c#
#basicchash
#basicc#
+1
vote
Q: Explain Code compilation in C#.
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicchash
#c#
+1
vote
Q: What are the types of Serialization?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#chash
#basicchash
#dotnet
#basicc#
+1
vote
Q: What are Synchronous and Asynchronous operations?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#basicc#
#chash
#basicchash
#c#
+1
vote
Q: What is an XSD file?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#basicc#
#chash
#basicchash
#c#
#xsd
#xml
+1
vote
Q: What is Thread Pooling?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#basicc#
#chash
#dotnet
#basicchash
#c#
...