Add ArrayDisplay Utils method

This commit is contained in:
2020-12-01 15:33:43 +01:00
parent 7b5716b8f3
commit 80e67f3afc

View File

@@ -13,5 +13,7 @@ namespace WaveshareUARTFingerprintSensor
public static (byte high, byte low) Split(ushort value) => ((byte)(value >> 8), (byte)(value & 0xFF));
public static (byte first, byte second, byte third) Split(uint value) => ((byte)(value >> 16 & 0xFF), (byte)(value >> 8 & 0xFF), (byte)(value & 0xFF));
public static string ArrayDisplay<T>(T[] arr) => $"[ {string.Join(", ", arr)} ]";
}
}