PIbd-21_MalafeevL.S._Cruise.../Cruiser/Generics/CruiserCollectionInfo.cs

31 lines
770 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cruiser.Generics
{
internal class CruiserCollectionInfo : IEquatable<CruiserCollectionInfo>
{
public string Name { get; private set; }
public string Description { get; private set; }
public CruiserCollectionInfo(string name, string description)
{
Name = name;
Description = description;
}
public bool Equals(CruiserCollectionInfo? other)
{
if (Name == other?.Name)
return true;
return false;
}
public override int GetHashCode()
{
return Name.GetHashCode();
}
}
}