C
C#4mo ago
Tom

✅ Predicates

Have you ever "add" more than one function to predicate definition: e.g. Predicate<T> p = func1; and then p += func2; If so in what circumstances? From my limited experience it does not make much sense, however compiler has nothing against that 😉 Maybe just because Predicate is based on delegate...
6 Replies
Omnissiah
Omnissiah4mo ago
it's used for events i personally not like that
jcotton42
jcotton424mo ago
Yes, but that won't and or or the predicates together. You'll just get the result of the last in the list.
Tom
TomOP4mo ago
exactly
jcotton42
jcotton424mo ago
And yeah, all delegates are multicast unfortunately.
Tom
TomOP4mo ago
thanks for input, let's wait, maybe someone will come up with "making-sense" example of utilizing that...
jcotton42
jcotton424mo ago
This by the way is why many events have their "return value" in a passed parameter.
Want results from more Discord servers?
Add your server