System.FormatException无法找到可识别的数字

用户名

当我尝试使用以下代码将十六进制字符串转换为字节数组时,出现此错误。请帮忙。

protected static byte[] HexStringToByte(string hexString)
    {
        try
        {
            int bytesCount = (hexString.Length) / 2;
            byte[] bytes = new byte[bytesCount];
            for (int x = 0; x < bytesCount; ++x)
            {
                bytes[x] = Convert.ToByte(hexString.Substring(x * 2, 2), 16);
            }
            return bytes;
        }
        catch
        {
            throw;
        }
    }
前级

HexaDecimal值

0ADB4DA38093W3350E49B0BA90O04A6C

您在评论中分享的内容无效。

因此问题出在从中获取此HexaDecimal值的代码中。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

FormatException:找不到任何可识别的数字

无法识别的配置节system.identityModel

F#groupBy-System.Exception:无法识别的方法调用

无法识别的配置部分为system.webServer。(对于Angular Core-Angular)

无法识别System.out

调试System.FormatException

Visual Studio无法识别System.Linq

System.EntryPointNotFoundException:无法找到入口点

无法找到System.Data.SqlClient参考

无法挂载/ system读写

无法解码 JSON,因为模型是可识别的

无法识别的字段类别未标记为可忽略

zsh shell提示显示无法识别的数字

System.Speech.Recognition无法准确识别连续输入

LINQ to Entities无法识别方法'System.String IfNullOrWhiteSpace'

在Visual Studio 2017中无法识别System.Drawing.Bitmap

LINQ to Entities无法识别方法ToDateTime(System.String)

LINQ to Entities无法识别System.Guid方法

在Maven项目中无法识别System.out.println

YAML 管道中无法识别术语“System.DefaultWorkingDirectory”

LINQ to Entities无法识别方法'System.Collections.Generic.Dictionary`2 [System.Int32,System.String] ToDictionary

LINQ to Entities无法识别方法'System.String StringConvert(System.Nullable`1 [System.Double])

DateTime.ParseExact引发System.FormatException

未处理的异常:System.FormatException

DateTime ParseExact 给出 System.FormatException:

带有索引的System.FormatException问题

LINQ to Entities 无法识别方法“System.Object GetValue(System.Object)”

LINQ to Entities无法识别方法'System.DateTime ToDateTime(System.String)'

LINQ to Entities无法识别方法'System.Object get_Item(System.String)'方法