您需要编写可接受日期时间参数并返回一个布尔值,多路广播的委托。您应该使用哪个代码段?()

12 查阅

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);

参考答案:

参考Ddelegate关键字用于声明一个引用类型,该引用类型可用于封装命名方法或匿名方法。委托类似于C++中的函数指针;但是,委托是类型安全和可靠的。

计算机考试