/// <summary> /// 返回指定的字节数组中以指定位置的字节转换来的值 /// </summary> /// <param name="buffer">来源字节数组</param> /// <param name="offset">数据偏移</param> /// <returns>值</returns> public static char ToChar(this byte[] buffer, int offset) { return(BitConverter.ToChar(buffer, offset)); }
public static char ToChar(ReadOnlySpan <byte> value) => Converter.ToChar(value);
public char GetChar() { return(BitConverter.ToChar(GetData(sizeof(char)), 0)); }