您需要编写可接受日期时间参数并返回一个布尔值,多路广播的委托。您应该使用哪个代码段?()
2021-05-06
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++中的函数指针;但是,委托是类型安全和可靠的。
词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。
