单项选择题
您需要编写可接受日期时间参数并返回一个布尔值,多路广播的委托。您应该使用哪个代码段?()
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);
相关考题
-
单项选择题
You develop a service application named PollingService that periodically calls long-running procedures.These procedures are called from the DoWork method.You use the following service application code: When you attempt to start the service, you receive the following error message: Could not start the PollingService service on the local computer.Error 1053: The service did not respond to the start or control request in a timely fashion. You need to modify the service application code so that the service starts properly.What should you do?()
A.Move the loop code into the constructor of the service class from the OnStart method.
B.Drag a timer component onto the design surface of the service. Move the calls to the long-running procedure from the OnStart method into the Tick event procedure of the timer, set the Enabled property of the timer to True, and call the Start method of the timer in the OnStart method.
C.Add a class-level System.Timers.Timer variable to the service class code. Move the call to the DoWork method into the Elapsed event procedure of the timer, set the Enabled property of the timer to True, and call the Start method of the timer in the OnStart method.
D.Move the loop code from the OnStart method into the DoWork method. -
单项选择题
You are developing an application that runs by using the credentials of the end user. Only users who are members of the Administrator group get permission to run the application. You write the following security code to protect sensitive data within the application.bool isAdmin=false; WindowsBuiltInRole role=WindowsBuiltInRole.Administrator; ...... if(!isAdmin) throw new Exception("User not permitted"); You need to add a code segment to this security code to ensure that the application throws an exception if a user is not a member of the Administrator group. Which code segment should you use?()
A.A
B.B
C.C
D.D -
单项选择题
您正在开发一个协助用户进行电子调查的应用程序。调查由25个对错判断题组成。您需要执行下列任务:将每个答案预置为是。最大程度地减少每次调查使用的内存量。您应该选择哪个存储选项?()
A.A
B.B
C.C
D.D
