31 lines
770 B
C#
31 lines
770 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace WarmlyShip.Generics
|
|
{
|
|
internal class ShipsCollectionInfo : IEquatable<ShipsCollectionInfo>
|
|
{
|
|
public string Name { get; private set; }
|
|
public string Description { get; private set; }
|
|
public ShipsCollectionInfo(string name, string description)
|
|
{
|
|
Name = name;
|
|
Description = description;
|
|
}
|
|
public bool Equals(ShipsCollectionInfo? other)
|
|
{
|
|
if (Name == other?.Name)
|
|
return true;
|
|
return false;
|
|
}
|
|
public override int GetHashCode()
|
|
{
|
|
return this.Name.GetHashCode();
|
|
}
|
|
}
|
|
}
|
|
|