Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CompanyFinanse
- {
- public decimal WeightedSumOfWorkerSalaryAndSuperior(Worker WorkerA, Worker Superior)
- {
- return WorkerA.Salary + Superior.Salary * 2;
- }
- }
- public class Worker {
- public Worker Superior {get;set;}
- public readonly decimal WeightedSalary {
- get {
- return (Superior.Salary * 2) + (this.Salary)
- }
- }
- public decimal Salary {get;set;}
- }
- public static class Finance {
- public static decimal WeightedSumOfWorkerSalaryAndSuperior(Worker WorkerA, Worker Superior) {
- return WorkerA.Salary + Superior.Salary * 2; }
- }
Add Comment
Please, Sign In to add comment