如已有一个委托声明为:public delegate int myCallBack(Object sender,EventArgs e);则用该委托可以调用下面哪个方法( )
A: int receive(Object sender,EventArgs e) {……}
B: void myCallBack(Object sender,EventArgs e){……}
C: string receive(int x) {……}
D: int myCallBack(int x,int y){……}
A: int receive(Object sender,EventArgs e) {……}
B: void myCallBack(Object sender,EventArgs e){……}
C: string receive(int x) {……}
D: int myCallBack(int x,int y){……}
举一反三
- 声明一个委托public delegate int myCallBack(int x); 则用该委托产生的回调方法的原型应该是( ) A: void myCallBack(int x) B: int receive(int num) C: string receive(int x) D: 不确定
- 声明一个委托类型public delegate int myCallBack(int x); 则以下语句可以和委托myCallBack绑定的方法是() A: void myCallBack(int x) B: int receive(int num) C: string receive(int x) D: 不确定的
- 声明一个委托 public delegate int myCallBack(int x) 则用该委托产生的回调方法的原型应该是 A: void myCallBack(int x) B: int receive(int num)
- .NET框架提供有专门的委托类EventHandler,原型如下: A: public delegate void EventHandler(object sender, EventArgs e); B: public delegate void EventHandler(EventArgs e, object sender); C: public event void EventDelegate(object sender, EventArgs e); D: public event void EventDelegate(EventArgs e, object sender);
- 下列语句声明了一个委托:public delegate int myCallBack(int x);则用该委托产生的回调方法的原型应该是( )。 A: void receive (int x) B: int receive( ) C: int receive(int num) D: 不确定的