Repository navigation
Sealed interface #7451
Replies: 4 comments 2 replies
|
I would not see "sealed interface" as can't be implentend in foreign assemblies. For me it looks that it can not be extended by other interface declarations. |
|
Maybe the interface can specify the types allowed to implement it with attributes in addition to the sealed [ImplementedBy(typeof(something)] |
|
Existing approaches would be:
You can work around these if you're determined, but the messaging can make it clear that you'll only hurt yourself with that kind of determination. |
Uh oh!
There was an error while loading. Please reload this page.
public sealed interface IMyInterface
{
}
It is a public interface, that can be used in other assemblies, but not implemented outside of the assembly it is defined in.
All reactions