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

using System.ComponentModel;

namespace CustomTypeConverter
{
    [TypeConverter(typeof(StreetAddressConverter))]
    class StreetAddress
    {
        [Description("The street number, name, apartment number, etc. as in '123 N. Elm Ave Suite 21'")]
        public string Street { get; set; }

        [Description("The mailing address city")]
        public string City { get; set; }

        [Description("The two-letter state abbreviation")]
        public string State { get; set; }

        [Description("The postal ZIP or ZIP+4 code")]
        public string Zip { get; set; }

        // Return as a comma-delimited string.
        public override string ToString()
        {
            return Street + "," + City + "," + State + "," + Zip;
        }
    }
}
