예제 #1
0
        /// <summary>
        /// Entry point into console application.
        /// </summary>
        static void Main()
        {
            // Facade
            Mortgage mortgage = new Mortgage();

            // Evaluate mortgage eligibility for customer
            Customer customer = new Customer { Name = "Ann McKinsey" };
            bool eligible = mortgage.IsEligible(customer, 125000);

            Console.WriteLine("\n" + customer.Name +
                " has been " + (eligible ? "Approved" : "Rejected"));

            // Wait for user
            Console.ReadKey();
        }
예제 #2
0
        /// <summary>
        ///     Entry point into console application.
        /// </summary>
        static void Main()
        {
            // Facade
            var mortgage = new Mortgage();

            // Evaluate mortgage eligibility for customer
            var customer = new Customer {
                Name = "Ann McKinsey"
            };
            bool eligible = mortgage.IsEligible(customer, 125000);

            Console.WriteLine($"\n{customer.Name} {(eligible ? "Approved" : "Rejected")}");

            // Wait for user
            Console.ReadKey();
        }