Better guid logging

This commit is contained in:
Marc Hernandez 2025-11-02 16:17:30 -08:00
parent bbef15138c
commit 6b092f8a41

View File

@ -9,7 +9,7 @@ public static class GuidExt
{
extension(Guid g)
{
public string Log => $"{g.LastByte():X}";
public string Log => $"{g.LastUShort():X8}";
}
public static System.Guid GuidFromLongs( long a, long b )
@ -92,6 +92,12 @@ public static class GuidExt
return (a, b, c, d);
}
public static ushort LastUShort( this System.Guid guid )
{
var bytes = guid.ToByteArray();
return BitConverter.ToUInt16( bytes, 14 );
}
public static byte LastByte( this System.Guid guid )
{
var bytes = guid.ToByteArray();