You work as an application developer at Certkiller .com. You

题目内容(请给出正确答案)
单选题
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. The following code is included in the CalcSalary class: public class CalcSalary { // for promotions public static bool IncrementSalary (Employee Emp, double Amount) { if (Emp.Status == QuarterlyReview.AboveGoals) Emp.Salary += Amount; return true; } else return false; } //for demotions public static bool DecrementSalary (Employee Emp, double Amount) { if (Emp.Status == QuarterlyReview.AboveGoals) Emp.Salary -= Amount; return true; } else return false; } } You would like to invoke the IncrementSalary and DecrementSalary methods dynamically at runtime from the sales manager application, and decide to create a delegate named SalaryDelegate to invoke them. You need to ensure that you use the appropriate code to declare the SalaryDelegate delegate.What is the correct line of code?()
A

 public delegate bool Salary (Employee Emp, double Amount);

B

 public bool Salary (Employee Emp, double Amount);

C

 public event bool Salary (Employee Emp, double Amount);

D

 public delegate void Salary (Employee Emp, double Amount);

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
更多相关问题