22 lines
539 B
C#
22 lines
539 B
C#
namespace ElectricLocomotive;
|
|
|
|
public class LocomotivCollectionInfo : IEquatable<LocomotivCollectionInfo>
|
|
{
|
|
public string Name { get; private set; }
|
|
public string Description { get; private set; }
|
|
public LocomotivCollectionInfo(string name, string description)
|
|
{
|
|
Name = name;
|
|
Description = description;
|
|
}
|
|
public bool Equals(LocomotivCollectionInfo? other)
|
|
{
|
|
return Name == other.Name;
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return this.Name.GetHashCode();
|
|
}
|
|
|
|
} |