Qus:    Can I declare a method as sealed?
Nov 30, 2020 13:36 2 Answers Views: 95 PADMAKEECHU

 



 Yes you can declare a method as sealed.



When you use sealed modifier on a method, then that method cannot be overridden.

Prev Next
Answers (2)
PARTH Dec 01, 2020 08:07
Answer:   Yes you can declare a method as sealed.

When you use sealed modifier on a method, then that method cannot be overridden.

SHIVA Dec 01, 2020 09:05
Answer:   No, In C# a method cannot be declared as sealed. But when we override a method in a derived class, we can declare the overridden method as sealed. By declaring it as sealed, we can avoid further overriding of the sealed method.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect