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