PIbd22_Kamcharova_K.A._Doub.../DoubleDeckerBus/Generic/BusCollectionInfo.cs

28 lines
754 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DoubleDeckerbus.Generics
{
internal class BusCollectionInfo : IEquatable<BusCollectionInfo>
{
public string Name { get; private set; }
public string Description { get; private set; }
public BusCollectionInfo(string name, string description)
{
Name = name;
Description = description;
}
public bool Equals(BusCollectionInfo? other)
{
if (ReferenceEquals(other, null))
return false;
return Name.Equals(other.Name);
}
public override int GetHashCode() => Name.GetHashCode();
}
}