PIbd-22_Kurbanova_A.A.Warml.../WarmlyLocomotive/WarmlyLocomotivesCollectionInfo.cs
2023-12-29 22:03:17 +04:00

26 lines
740 B
C#

using WarmlyLocomotive.Generics;
namespace WarmlyLocomotive
{
internal class WarmlyLocomotivesCollectionInfo : IEquatable<WarmlyLocomotivesCollectionInfo?>
{
public string Name { get; private set; }
public string Description { get; private set; }
public WarmlyLocomotivesCollectionInfo(string name, string description)
{
Name = name;
Description = description;
}
public bool Equals(WarmlyLocomotivesCollectionInfo? other)
{
if (other == null)
return false;
return Name == other.Name;
}
public override int GetHashCode()
{
return this.Name.GetHashCode();
}
}
}