//구조체 선언

        public struct Customer
        {
            public bool IsSenior;
            public bool IsVeteran;
            public bool IsMinor;
            public string Level;

 

            //public Customer(bool IsSenior, bool IsVeteran, bool IsMinor, string Level)
            //{
            //    this.IsSenior = IsSenior;
            //    this.IsVeteran = IsVeteran;

            //    this.IsMinor = IsMinor;

            //    this.Level = Level;

            //}

        }

 

//용례1

            //Customer customer = new Customer (false,false,false,"A");

 

//용례2

            Customer customer2 = new Customer{

                IsSenior = false,

                IsVeteran = false,

                IsMinor = false,

                Level = "A"

            };

+ Recent posts