Пример #1
0
    public void AddLincesPlate(LincensePlateInfo licensePlate)
    {
        bool lincesPlateAlreadyExists = licensePlate.Add(licensePlate);

        Console.BackgroundColor = ConsoleColor.DarkBlue;
        Console.ForegroundColor = ConsoleColor.Red;
        if (!lincesPlateAlreadyExists)
        {
            Console.WriteLine("the linces Plate: " + licensePlate + " already exist");
        }
        else
        {
            Console.WriteLine("Linces Plate was added into  the sytem");
        }
    }
Пример #2
0
        static void Main(string[] args)
        {
            DMV dmv = new DMV();

            LincensePlateInfo firstLicensePlate = new LincensePlateInfo();

            firstLicensePlate.LincensePlate = "YHG567";
            firstLicensePlate.State         = "TX";

            firstLicensePlate.LincensePlate = "IUE098";
            firstLicensePlate.State         = "TX";

            LincensePlateInfo secondLicensePlate = new LincensePlateInfo();

            dmv.AddLincesPlate(firstLicensePlate);
            dmv.AddLincesPlate(secondLicensePlate);
        }
Пример #3
0
 internal bool Add(LincensePlateInfo licensePlate)
 {
     throw new NotImplementedException();
 }
Пример #4
0
    public override bool Equals(object obj)
    {
        LincensePlateInfo comparerLincesPlate = obj as LincensePlateInfo;

        return(this.LincensePlate.Equals(comparerLincesPlate.LincensePlate));
    }