Specify that an interface can only be implemented by reference types C#
问题 If I declare an interface in C#, is there any way I can explicitly declare that any type implementing that interface is a reference type? The reason I want to do this is so that wherever I use the interface as a type parameter, I don't have to specify that the implementing type also has to be a reference type. Example of what I want to accomplish: public interface IInterface { void A(); int B { get; } } public class UsingType<T> where T : IInterface { public void DoSomething(T input) {