From 565c3a3d0e7fb13effb526d2d6014f70a4d23f3b Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期一, 13 一月 2025 22:06:46 +0800 Subject: [PATCH] 板材仓 --- 代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs" index dc67877..6b1bac0 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WIDESEAWCS_Server/WIDESEAWCS_Common/Helper/ConvertHelper.cs" @@ -8,9 +8,9 @@ namespace WIDESEAWCS_Common.Helper { - public class ConvertHelper + public static class ConvertHelper { - public static bool[] ByteToBoolArray(byte data) + public static bool[] ByteToBoolArray(this byte data) { bool[] result = new bool[8]; for (int i = 0; i < 8; i++) @@ -20,10 +20,12 @@ return result; } - public static T ByteToBoolObject<T>(byte data) + public static T ByteToBoolObject<T>(this byte data) { bool[] boolArray = ByteToBoolArray(data); + //Array.Reverse(boolArray); + Type type = typeof(T); object? obj = Activator.CreateInstance(type); if (obj == null) -- Gitblit v1.9.3