单项选择题
A. Override the OnBoot method instead of the OnStart method.
B. Replace the Main method code with the following code: EnumerateService service = new EnumerateService (); Service.Run ();
C. Override the OnLoad method instead of the OnStart method.
D. Replace the Main method code with the following code: EnumerateService service = new EnumerateService (); Run (service);
单项选择题 You work as an application developer at Certkiller .com. You have recently created a Windows service application and need to define a Windows service class. What should you do?()
单项选择题 YouworkasanapplicationdeveloperatCertkiller.com.YouhavebeengiventheresponsibilityofcreatingaclassnamedCalcSalarythatwilldeterminethesalariesofCertkiller.com’sstaff.TheCalcSalaryclassincludesmethodstoincrementanddecrementstaffsalaries.ThefollowingcodeisincludedintheCalcSalaryclass:publicclassCalcSalary{//forpromotionspublicstaticboolIncrementSalary(EmployeeEmp,doubleAmount){if(Emp.Status==QuarterlyReview.AboveGoals)Emp.Salary+=Amount;returntrue;}elsereturnfalse;}//fordemotionspublicstaticboolDecrementSalary(EmployeeEmp,doubleAmount){if(Emp.Status==QuarterlyReview.AboveGoals)Emp.Salary-=Amount;returntrue;}elsereturnfalse;}}YouwouldliketoinvoketheIncrementSalaryandDecrementSalarymethodsdynamicallyatruntimefromthesalesmanagerapplication,anddecidetocreateadelegatenamedSalaryDelegatetoinvokethem.YouneedtoensurethatyouusetheappropriatecodetodeclaretheSalaryDelegatedelegate.Whatisthecorrectlineofcode?()
单项选择题 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.You would like to invoke the IncrementSalary and DecrementSalary methods dynamically at runtime from the sales manager application when needed. After viewing the information displayed in the exhibit, you decide to use the Salary delegate to invoke these methods. using System; public delegate boolSalary (Employee Emp, double Amount); public class CalcSalary { // for promotions public static bool IncrementSalary (Employee Emp, double Amount) { // implementation details } // for demotions public static bool DecrementSalary (Employee Emp, double Amount) { // implementation details } What code should you use?()