单项选择题 YouworkasanapplicationdeveloperatCertkiller.com.YouhavebeengiventhetaskofdevelopingaWindowsserviceapplicationthatregularlymonitorsotherWindowsservicesonthesamecomputer.ThisWindowsserviceapplicationmustalsologanyabnormalfilesystemactivity.YouhaveaddedthefollowingclasstotheWindowsserviceapplication:publicclassEnumerateService:ServiceBase{publicstaticEnumerateService(){this.ServiceName="EnumerateService";this.CanStop=true;}protectedoverridevoidOnStart(string[]args){//EnumerateallservicesandinitializetheFileSystemWatcher}protectedoverridevoidOnStop(){//StoptheFileSystemWatcherandperformcleanup}publicstaticvoidMain(){EnumerateServiceservice=newEnumerateService();}}YouthencreatetheinstallerfortheWindowsserviceapplication,andinstalltheWindowsserviceapplication.YouhaveconfiguredtheWindowsserviceStartuptypetoAutomatic,andrebootedthesystem.YouthentestthenewWindowsserviceapplication,andfindthatitisnotworking.Youneedtoensurethattheserviceisworkingproperly.Whatshouldyoudo?()
单项选择题 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?()