Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            string doc = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            EmployeePayrollReport epr = new EmployeePayrollReport();

            epr.GenerateReport(doc + "\\April_2019_Salary_Report", EmployeePayrollReport.DocumentType.Txt);
            Console.ReadLine();



            Car a = new Car();

            a.Brand          = "Bugatti";
            a.Color          = "Black";
            a.Engine         = "V16";
            a.Weight         = 1888;
            a.ProductionYear = 2014;
            a.Model          = "Bugatti Veyron Supersport";
            a.Driving();
            Console.WriteLine(a);
            Console.ReadKey();
            Person p  = new Person();
            Person p2 = new Person();

            p.Firstname = "Alfred";
            p.SetFirstname("James O.");
            WriteLine(p.GetFirstName());
            ReadKey();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            string doc = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            EmployeePayrollReport rpt = new EmployeePayrollReport();

            rpt.GenerateReport(doc + "\\2019_April_Salary_report", EmployeePayrollReport.DocumentType.Txt);
            ReadLine();


            Person p  = new Person();
            Person p2 = new Person();

            //p.FirstName = "Alfred";
            if (String.IsNullOrEmpty(p.LastName))
            {
                WriteLine("Please assign a Last Name");
                p.LastName = ReadLine();
            }
            string nameUpper = p.LastName;

            WriteLine("Last NAME IS  " + nameUpper);
            p.SetFirstName("James O.");

            WriteLine(p.GetFirstName());

            Console.WriteLine($"p.GetHashCode is {p.GetHashCode()}\n" +
                              $"p2.GetHashCode is {p2.GetHashCode()}\n");

            Console.WriteLine($"p.Equals p2 is {p.Equals(p2)}\n");

            Console.WriteLine(p);
            Console.ReadKey();
        }