C
C#3mo 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
Omnissiah3mo ago
it's used for events i personally not like that
jcotton42
jcotton423mo 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
Tom3mo ago
exactly
jcotton42
jcotton423mo ago
And yeah, all delegates are multicast unfortunately.
Tom
Tom3mo ago
thanks for input, let's wait, maybe someone will come up with "making-sense" example of utilizing that...
jcotton42
jcotton423mo 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