PIbd22_NikiforovaMV_Contain.../ContainerShip/ShipsCollectionInfo.cs
2023-12-29 22:22:08 +04:00

28 lines
759 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ContainerShip.Generic
{
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 (ReferenceEquals(other, null))
return false;
return Name.Equals(other.Name);
}
public override int GetHashCode() => Name.GetHashCode();
}
}