C#C
C#2y ago
TahaA

✅ where constraint on interface method

Is it even possible? Like public void RefuelCar<c>(c Car) where c : IUseGas.Refuel

Here the generic type is constrainted to where it implements an interface's method, whereas the name of the interface is IUseGas
Was this page helpful?