What is Multicas...
What is Multicas...
A Multicast Delegate in C# is a delegate that can hold references to multiple handler functions[1][2][3]. When the multicast delegate is invoked, it calls all the referenced methods in the order they were added to the delegate[1][4][5].
To create a multicast delegate, you first create two regular unicast delegates (delegates that reference a single method) and combine them using the +
operator[4]. This internally calls Delegate.Combine
with the two delegates as arguments and returns a new multicast delegate instance[4].
The behavior of a multicast delegate when invoked is as follows:
Some key points about multicast delegates:
expert
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào