mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-02 15:50:47 +08:00
12 lines
313 B
C#
12 lines
313 B
C#
namespace Serein.Proto.Modbus
|
|
{
|
|
public static class HexExtensions
|
|
{
|
|
public static string ToHexString(this byte[] data, string separator = " ")
|
|
{
|
|
if (data == null) return string.Empty;
|
|
return BitConverter.ToString(data).Replace("-", separator);
|
|
}
|
|
}
|
|
}
|