23 lines
645 B
C#
23 lines
645 B
C#
namespace ProjectTank.Generics
|
|
{
|
|
internal class TanksCollectionInfo : IEquatable<TanksCollectionInfo>
|
|
{
|
|
public string Name { get; private set; }
|
|
public string Description { get; private set; }
|
|
public TanksCollectionInfo(string name, string description)
|
|
{
|
|
Name = name;
|
|
Description = description;
|
|
}
|
|
public bool Equals(TanksCollectionInfo? other)
|
|
{
|
|
if (other == null) return false;
|
|
return Name == other.Name;
|
|
}
|
|
public override int GetHashCode()
|
|
{
|
|
return this.Name.GetHashCode();
|
|
}
|
|
}
|
|
}
|