C#

delegate example

by LionHeart posted Sep 10, 2020
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
[Child]
public delegate int TR_비밀번호_확인_Handler(string 계좌번호, string 비밀번호);
public event TR_비밀번호_확인_Handler TR_비밀번호_확인_event;

[Parent]
user_계좌정보1.TR_비밀번호_확인_event += TR_비밀번호확인;


Thread 내부에서의 Invoke

                if (this.InvokeRequired)
                {
                    this.Invoke(new MethodInvoker(delegate ()
                    {
                        당일연산실행_event("KRX", "stock_data2");
                    }));
                }
                else
                {
                    당일연산실행_event("KRX", "stock_data2");
                }