Hai Techies,
in C#, how can we define the multicast delegate which accepts a DateTime object and return a boolean.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is how to declare a delegate with the signature you describe. All delegates are potentially multicast, they simply require initialization. Such as:
Calling
fAll, in this case would call bothIsGreaterThanNow()andIsLessThanNow().What this doesn’t do is give you access to each return value. All you get is the last value returned. If you want to retrieve each and every value, you’ll have to handle the multicasting manually like so: