PIbd-21_KozyrevSS_GasolineT.../Lab/TankerCollectionInfo.cs

32 lines
933 B
C#
Raw Permalink Normal View History

2023-12-17 15:10:01 +04:00
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Lab.DrawningObjects;
using Lab.Generics;
namespace Lab
{
internal class TankerCollectionInfo : IEquatable<TankerCollectionInfo>
{
public string Name { get; private set; }
public string Description { get; private set; }
public TankerCollectionInfo(string name, string description)
{
Name = name;
Description = description;
}
public bool Equals(TankerCollectionInfo? other)
{
if (other == null || Name == null || other.Name == null) return false;
if (Name == other.Name) return true;
throw new NotImplementedException();
}
public override int GetHashCode()
{
return Name?.GetHashCode() ?? 0;
}
}
}