Default value on generic predicate as argument

后端 未结 3 2130
旧巷少年郎
旧巷少年郎 2020-12-18 18:20

First time question for me :)

I need some way to define a default predicate using a generic on the format

Func

and

3条回答
  •  再見小時候
    2020-12-18 18:54

    Try this:

    public bool Broadcast(byte command, MemoryStream data, bool async, Func predicate = default(Func))
    

    But I think you have to check for predicate!=null.

提交回复
热议问题