In C# is it possible to pass a method a nullable Func?
Neither Func<A, bool>?
nor Func?<A, bool>
is working.
That doesn't make sense.
All reference types, including Func<...>
, can already be null
.
Nullable types apply to value types (struct
s), which cannot ordinarily be null
.
A Func is a delegate which is a reference type. This means it is already nullable (you can pass null to a method).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With