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
How can we set class to be inherited, but prevent the method from being over-ridden?
Home
Dot Net
How can we set class to be inherited, but prevent the method from being over-ridden?
0
votes
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
How can we set class to be inherited, but prevent the method from being over-ridden?
#dotnet
#chash
#basicc#
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jun 25, 2019
by
Venkatshastri
Declare the class as public and make the method sealed to prevent it from being overridden.
Related questions
+1
vote
Q: What happens if the inherited interfaces have conflicting method names?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicc#
0
votes
Q: What are the different ways a method can be overloaded?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicc#
+1
vote
Q: Can a private virtual method be overridden?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#basicc#
#chash
+1
vote
Q: Can "this" be used within a static method?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#basicc#
#chash
+1
vote
Q: Name some properties of Thread Class.
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#basicc#
#chash
#basicchash
#c#
+1
vote
Q: What is a Generic Class?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#basicc#
#chash
+1
vote
Q: What is the difference between a Struct and a Class?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicc#
+2
votes
Q: What's the difference between an interface and abstract class?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicc#
+1
vote
Q: Can a private virtual method can be overridden?
asked
Apr 9, 2020
in
C Sharp
by
GeorgeBell
#dotnet
#chash
#basicc#
+1
vote
Q: How to use Delegates with Events?
asked
Jun 25, 2019
in
Dot Net
by
Venkatshastri
#dotnet
#chash
#basicc#
...