C# generic type constraint for everything nullable

后端 未结 8 2073
无人共我
无人共我 2020-12-09 14:11

So I have this class:

public class Foo where T : ???
{
    private T item;

    public bool IsNull()
    {
        return item == null;
    }

}
         


        
8条回答
提交回复
热议问题