Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Ask a Question
What are the different types of classes in C#?
Home
Dot Net
What are the different types of classes in C#?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
What are the different types of classes in C#?
#dotnet
#chash
#basicchash
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
What are sealed classes in C#?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#chash
#dotnet
#basicchash
+1
vote
What are the different types of Delegates?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicchash
#basicc#
+1
vote
What are C# attributes and its significance?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicchash
#c#
+1
vote
What are generics in C#.NET?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicchash
#c#
+1
vote
What is Reflection in C#?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#c#
#basicchash
#basicc#
+1
vote
Explain Code compilation in C#.
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicchash
#c#
+1
vote
What are the types of Serialization?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#chash
#basicchash
#dotnet
#basicc#
+1
vote
What are Synchronous and Asynchronous operations?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#basicc#
#chash
#basicchash
#c#
+1
vote
What is an XSD file?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#basicc#
#chash
#basicchash
#c#
#xsd
#xml
+1
vote
What is Thread Pooling?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#basicc#
#chash
#dotnet
#basicchash
#c#
+1
vote
Name some properties of Thread Class.
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#basicc#
#chash
#basicchash
#c#
+1
vote
What do Multicast Delegates mean?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#basicc#
#chash
#basicchash
#c#
+2
votes
What is the difference between finally and finalize block
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicchash
+1
vote
What is the difference between Finalize() and Dispose() methods?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#chash
#dotnet
#basicchash
0
votes
What are the different states of a Thread?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#chash
#basicc#
#basicchash
...