可学答题网 > 问答 > MCPD(70-536)题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

You work as an&#8194


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);
参考答案
参考解析:
分类:MCPD(70-536)题库
相关推荐

1、You work as an 

You work as an application developer at Certkiller .com. Certkiller .com has instructed&#8194...

2、You work as an 

You work as an Exchange Administrator for UniCom Inc.The company has a Windows 2008&#81...

3、You work as an 

You work as an administrator at ABC.com. The ABC.com network consists of a single&#8194...

4、You work as an 

You work as an administrator at ABC.com.The ABC.com network consists of a single domain...

5、You work as an 

You work as an administrator at ABC.com. The ABC.com network consists of a single&#8194...

6、You work as an 

You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visu...