how to access Custom EventArgs class in Button click event?

后端 未结 3 775
余生分开走
余生分开走 2021-01-27 03:13

As a follow up to: access values within custom eventargs class

How do I access public variables within custom Eventargs class, using button click or any other method?

3条回答
  •  长情又很酷
    2021-01-27 03:25

    Solution: Pass custom event args through a custom delegate and event that returns the data (Datatable, Array, etc)...using whatever button click or other event necessary.

    So as a function of the delegate the correct data is returned.. I can not post the complete code here, but it is a modification of this very excellent example on event delegate usage...

    Core C# and .NET 3.7. Delegates and Events http://flylib.com/books/en/4.253.1.38/1/

提交回复
热议问题