Execution order of construction

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCode_Framework_ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            Customer customer = new Customer("aa", "bb");
            Console.WriteLine(customer.aa);
            Console.WriteLine(customer.bb);
            Console.WriteLine (customer.ee);
            Console.ReadLine (); 

        } 
    } 
    public  class the Customer 
    { 
        public  String AA = " AA uninitialized " ;
         public  String BB = " BB uninitialized " ;
         public  String EE = " EE uninitialized " ;
         public  int I = 0 ; 

        public the Customer () 
        { 
            the this .aa = i.ToString (); 
            I ++ ; 
        } 
        public Customer(string aa):this()
        {
            this.bb = i.ToString();
            i++;
        }
        public Customer(string aa,string bb):this(bb)
        {
            this.ee = i.ToString();
            i++;
        }

    }
}

 

Guess you like

Origin www.cnblogs.com/heibai-ma/p/11276972.html