mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
18 lines
440 B
C#
18 lines
440 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Serein.Library.Network.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);
|
|
}
|
|
}
|
|
}
|