Exemplo n.º 1
0
 // Printing method:
 public void printEmployee()
 {
     Console.WriteLine("Name: {0}\nAlias: {1}", name, alias);
     // Passing the object to the CalcTax method by using this:
     Console.WriteLine("Taxes: {0:C}", Tax.CalcTax(this));
 }
Exemplo n.º 2
0
 //Printing
 internal void printEmployee()
 {
     Console.WriteLine("Name: {0} \n Alias: {1} \n Salary: {2} ", name, alias, salary);
     //Passing the object to the CalcTax method by using 'this'"
     Console.WriteLine("Taxes: {0:C} \n", Tax.CalcTax(this));
 }