14 Replies
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
This can work if the classes are not static, and if you do
but then you'd have to have
not sure....
you need .NET 7 for this
Explore static virtual members in interfaces
This advanced tutorial demonstrates scenarios for operators and other static members in interfaces.
static classes still can't implement interfaces of course
Do you need All for something? What? Otherwise maybe something like an
IValidateable/<T>
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
Sure
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
What you care about is being able to validate stuff. If "All" is only there for that purpose, it's an implementation detail and doesn't need to be exposed at all.
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
It kind of is your whole abstraction. But maybe you should be using something like fluentvalidation instead? Either way, All doesn't need to be part of your "interface"
Unknown UserOP•3y ago
Message Not Public
Sign In & Join Server To View
✅ This post has been marked as answered!