Why are interfaces not able to be marked as sealed?

The purpose of sealing a class, or a virtual method of a class, is to lower your costs . Designing for inheritance is expensive and if you do not do it correctly, it is dangerous . There are security, correctness and robustness consequences to improperly designing for inheritance, so if you do not intend to design for inheritance, it is wise to seal your class and thereby avoid the costs associated with designing for inheritance.

It would just be confusing. Using the standard syntax, it would imply that you cannot implement the interface. Also, interfaces don't contain any functionality or fields, so there is no practical use in sealing it.

An interface is more or less a contract.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions