网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

声明一个委托类型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); 则以下语句可以和委托myCallBack绑定的方法是()A、 void myCallBack(int x)B、 int receive(int num)C、 string receive(int x)D、 不确定的” 相关考题
考题 ( 12 )已知类 sample 是一个抽象类,其成员函数 display 是无形参、无返回类型的纯虚函数,请完成其声明 :class sample{public:sample(){};___________};

考题 您需要写一个接收日期参数的多播委托,您应该使用哪一个代码片段() //委托就是一个方法,题目没有返回值。 A.public delegate int PowerDeviceOn(bool result, DateTime autoPowerOff);B.public delegate bool PowerDeviceOn(object sender, EventArgs autoPowerOff);C.public delegate void PowerDeviceOn(DateTime autoPowerOff);D.public delegate bool PowerDeviceOn(DateTime autoPowerOff);

考题 您写了下面这段代码 public delegate void FaxDocs(object sender, FaxArgs args); 您需要创建一个事件去调用FaxDocs,您应该使用哪个代码片段?() A.B.C.D.

考题 您需要编写可接受日期时间参数并返回一个布尔值,多路广播的委托。您应该使用哪个代码段?() A.public delegate int PowerDeviceOn(bool, DateTime);B.public delegate bool PowerDeviceOn(Object, EventArgs);C.public delegate void PowerDeviceOn(DateTime);D.public delegate bool PowerDeviceOn(DateTime);

考题 声明一个变量为局部变量应该刚( )。A.GlobalB.PrivateC.StaticD.Public

考题 根据委托(delegate)的知识,请完成以下用户控件中代码片段的填写:namespace test{public delegate void OnDBOperate();public class UserControlBase : System.Windows.Forms.UserControl{public event OnDBOperate OnNew;privatevoidtoolBar_ButtonClick(objectsender,System.Windows.Forms.ToolBarButtonClickEventArgs e){if(e.Button.Equals(BtnNew)){//请在以下补齐代码用来调用OnDBOperate委托签名的OnNew事件。}}}

考题 已知类sample是一个抽象类,其成员函数display是无形参、无返回类型的纯虚函数,请完成其声明:sample{public:sample( ){ };______};

考题 指出下面哪一项是在抽象类中声明一个抽象方法。( )A.public abstract method();B.public abstract void method();C.public void abstract Method();D.public void method(){abstract;}

考题 声明一个委托类型MyFun1,该委托类型可以与无参且返回值为int类型的方法相关联,则该声明语句应为()

考题 JavaBean的属性必须声明为private,方法必须声明为()访问类型。A、privateB、staticC、protectD、public

考题 下面哪一个是正确的类的声明?()A、public void HH{…}B、public class Move(){…}C、public class void number{}D、public class Car{…}

考题 Delegate,也就是委托,是可用于调用其他对象方法的对象,该类型提供函数指针的功能。

考题 C#中关于委托,下面说法正确的是()A、委托是一种类的成员B、委托必须定义在类中C、定义委托需要使用delegate关键字D、委托是一种数据类型

考题 以下()是用于声明枚举类型的关键字。A、staticB、structC、enumD、delegate

考题 有声明语句:delegate void TimeDelegate(string s),则以下语句可以和委托TimeDelegate绑定的方法是()A、 void f(){  }B、 string f(){  }C、 void f(string a){  }D、 string f(string a){  }

考题 委托类型DG1的定义为delegate float DG1(int a,ref double b);那么下列委托对象的创建表达式中合法的有:()。A、DG 1dg1=delegate {return 0.3;};B、DG 1dg2=delegate {return a;};C、DG 1dg3=delegate (int a,ref double b) {return a;};D、DG 1dg4=delegate (int a,ref double b) {return a/b;};

考题 声明委托实际上是声明了一个方法。

考题 You need to write a multicast delegate that accepts a DateTime argument.Which code segment should you use?()A、public delegate int PowerDeviceOn(bool result,DateTime autoPowerOff);B、public delegate bool PowerDeviceOn(object sender,EventArgs autoPowerOff);C、public delegate void PowerDeviceOn(DateTime autoPowerOff);D、public delegate bool PowerDeviceOn(DateTime autoPowerOff);

考题 You work as an application developer at Certkiller .com. You have been given the responsibility of creating a class named CalcSalary that will determine the salaries of Certkiller .com’s staff. The CalcSalary class includes methods to increment and decrement staff salaries. The following code is included in the CalcSalary class: public class CalcSalary { // for promotions public static bool IncrementSalary (Employee Emp, double Amount) { if (Emp.Status == QuarterlyReview.AboveGoals) Emp.Salary += Amount; return true; } else return false; } //for demotions public static bool DecrementSalary (Employee Emp, double Amount) { if (Emp.Status == QuarterlyReview.AboveGoals) Emp.Salary -= Amount; return true; } else return false; } } You would like to invoke the IncrementSalary and DecrementSalary methods dynamically at runtime from the sales manager application, and decide to create a delegate named SalaryDelegate to invoke them. You need to ensure that you use the appropriate code to declare the SalaryDelegate delegate.What is the correct line of code?()A、 public delegate bool Salary (Employee Emp, double Amount);B、 public bool Salary (Employee Emp, double Amount);C、 public event bool Salary (Employee Emp, double Amount);D、 public delegate void Salary (Employee Emp, double Amount);

考题 您需要编写可接受日期时间参数并返回一个布尔值,多路广播的委托。您应该使用哪个代码段?()A、public delegate int PowerDeviceOn(bool, DateTime);B、public delegate bool PowerDeviceOn(Object, EventArgs);C、public delegate void PowerDeviceOn(DateTime);D、public delegate bool PowerDeviceOn(DateTime);

考题 您已创建一个名为 CalcSalary,将确定 Certkiller.com 员工的薪酬类的责任。CalcSalary 类包括员工的薪酬递增和递减的方法。下面的代码包含在 CalcSalary 类中:()public class CalcSalary {// for promotionspublic static bool IncrementSalary (Employee Emp, double Amount){if (Emp.Status == QuarterlyReview.AboveGoals)Emp.Salary += Amount;return true;A、public delegate bool Salary (Employee Emp, double Amount);B、public bool Salary (Employee Emp, double Amount);C、public event bool Salary (Employee Emp, double Amount);D、public delegate void Salary (Employee Emp, double Amount);

考题 单选题声明一个委托类型public delegate int myCallBack(int x); 则以下语句可以和委托myCallBack绑定的方法是()A  void myCallBack(int x)B  int receive(int num)C  string receive(int x)D  不确定的

考题 单选题有声明语句:delegate void TimeDelegate(string s),则以下语句可以和委托TimeDelegate绑定的方法是()A  void f(){  }B  string f(){  }C  void f(string a){  }D  string f(string a){  }

考题 单选题您需要编写可接受日期时间参数并返回一个布尔值,多路广播的委托。您应该使用哪个代码段?()A public delegate int PowerDeviceOn(bool, DateTime);B public delegate bool PowerDeviceOn(Object, EventArgs);C public delegate void PowerDeviceOn(DateTime);D public delegate bool PowerDeviceOn(DateTime);

考题 判断题Delegate,也就是委托,是可用于调用其他对象方法的对象,该类型提供函数指针的功能。A 对B 错

考题 单选题您需要写一个接收日期参数的多播委托,您应该使用哪一个代码片段() //委托就是一个方法,题目没有返回值。A public delegate int PowerDeviceOn(bool result, DateTime autoPowerOff);B public delegate bool PowerDeviceOn(object sender, EventArgs autoPowerOff);C public delegate void PowerDeviceOn(DateTime autoPowerOff);D public delegate bool PowerDeviceOn(DateTime autoPowerOff);

考题 填空题声明一个委托类型MyFun1,该委托类型可以与无参且返回值为int类型的方法相关联,则该声明语句应为()