dev_timestamp
Harald Wolff 2019-05-07 10:21:53 +02:00
parent 4425a76d21
commit a407246e09
1 changed files with 12 additions and 1 deletions

View File

@ -2,7 +2,7 @@
using System.Globalization;
namespace ln.types.net
{
public class MAC
public class MAC : IComparable<MAC>
{
readonly byte[] mac;
@ -57,5 +57,16 @@ namespace ln.types.net
}
return false;
}
public int CompareTo(MAC other)
{
for (int n=0;n<6;n++)
{
int d = mac[n] - other.mac[n];
if (d != 0)
return d;
}
return 0;
}
}
}