Пример #1
0
        public static void CreateCustomer()
        {
            Customer C1 = new Customer();
            C1.FirstName = "Adam";
            C1.LastName = "Bond";
            string CustomerOnefullName = C1.GetFullName();
            Console.WriteLine(CustomerOnefullName);

            Console.WriteLine();

            PartialCustomer C2 = new PartialCustomer();
            C2.FirstName = "Richard";
            C2.LastName = "Mat";
            string CustomerTwoFullName = C2.GetFullName();
            Console.WriteLine(CustomerTwoFullName);
        }
Пример #2
0
        static void Main(string[] args)
        {
            Customer customer = new Customer {
                FirstName = "Alla", LastName = "Akbar"
            };

            Console.WriteLine(customer.GetFullName());

            //Partial Customer One
            PartialCustomer partialCustomer = new PartialCustomer {
                FirstName = "Jesus", LastName = "Christ"
            };

            //Partial Customer Two
            Console.WriteLine(partialCustomer.GetFullName());
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Customer c1 = new Customer();
            //c1.FirstName = "Wasindu";
            //c1.LastName = "Desitha";
            //string FullName1 = c1.GetFullName();
            //Response.Write("Full Name =" + FullName1 + "<br/>");

            PartialCustomer c2 = new PartialCustomer();

            c2.FirstName = "Vidura";
            c2.LastName  = "Bhashana";
            string FullName2 = c2.GetFullName();

            Response.Write(FullName2 + "<br/>");
        }
Пример #4
0
        public static void CreateCustomer()
        {
            Customer C1 = new Customer();

            C1.FirstName = "Adam";
            C1.LastName  = "Bond";
            string CustomerOnefullName = C1.GetFullName();

            Console.WriteLine(CustomerOnefullName);

            Console.WriteLine();

            PartialCustomer C2 = new PartialCustomer();

            C2.FirstName = "Richard";
            C2.LastName  = "Mat";
            string CustomerTwoFullName = C2.GetFullName();

            Console.WriteLine(CustomerTwoFullName);
        }