Готовая 8 лаба
This commit is contained in:
parent
409f14e146
commit
bd6b78605d
25
Tank/Tank/ObjectComparable.cs
Normal file
25
Tank/Tank/ObjectComparable.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Tank.DrawingObjects;
|
||||||
|
using Tank.Generics;
|
||||||
|
|
||||||
|
namespace Tank
|
||||||
|
{
|
||||||
|
internal class ObjectComparable : IComparer<TanksGenericStorage?>
|
||||||
|
{
|
||||||
|
public int Compare(TanksGenericStorage? x, TanksGenericStorage? y) {
|
||||||
|
if (x == null)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (y == null)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user