单项选择题
You work as aplication developer at Cer-Tech.com. You have recently created an aplication that includes the code shown below.You now need to invoke the GetFileContents method asynchronously.You have to ensure that the code you use to invoke the GetFileContents method will continue to process other user instructions, and displays the results as soon as the GetFileContents method finishes processing. What should you do?()
A.A
B.B
C.C
D.D
相关考题
-
多项选择题
哪些类型的对象从 MemberInfo类检索?()
A.FieldInfo class
B.MethodInfo class
C.Assembly class
D.Type class -
单项选择题
您需要编写可接受日期时间参数并返回一个布尔值,多路广播的委托。您应该使用哪个代码段?()
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.
