So these two methods have the same signature but different constraints

public static void Method<T>(ref T variable) where T : struct { }

public static void Method<T>(ref T variable) where T : class { }

But they cannot be defined in a single class because they have the same signatures. But in this particular case they're mutually exclusive. (Unless I'm wrong about that)

I understand you can put additional constraints besides class and struct but you can't specify both struct and class on the same method. So why would this fail to compile?

c#
Edit
Report