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