public void TestFromHexCharArray() { var chars = new[] { '0', '0', '0', '1', '0', '2', '0', '3', '0', '4', '0', '5', '0', '6', '0', '7', '0', '8', '0', '9', '0', 'A', '0', 'B', '0', 'C', '0', 'D', '0', 'E', '0', 'F' }; var expectedBytes = new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; var actualBytes = Hex.FromHexCharArray(chars); Assert.NotNull(actualBytes); Assert.AreEqual(expectedBytes.Length, actualBytes.Length); for (var i = 0; i < expectedBytes.Length; ++i) { Assert.AreEqual(expectedBytes[i], actualBytes[i]); } }