Interfaces have always been a way to define a contract that classes must implement, but they were limited to instance members.
In C# 11.0, you can now define static abstract or virtual members on an interface.
Code
csharp
public interface IConcatable<T> where T : IConcatable<T>
{
static abstract T Concat(T a, T b);
}csharp
public interface IConcatable<T> where T : IConcatable<T>
{
T Concat(T other);
}Notes
- This feature is part of the work in enabling generic math support