void in C# generics?

后端 未结 7 1980
小蘑菇
小蘑菇 2020-12-13 03:11

I have a generic method that takes a request and provides a response.

public Tres DoSomething(Tres response, Treq request)
{/*stuff*/}
         


        
7条回答
  •  醉梦人生
    2020-12-13 03:39

    void, though a type, is only valid as a return type of a method.

    There is no way around this limitation of void.

提交回复
热议问题