using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void ClearTextBox()
{
HexText.Text = "";
StringText.Text = "";
ByteArrayText.Text = "";
this.Update();
Thread.Sleep(1000);
}
// HEX
private void button1_Click(object sender, EventArgs e)
{
ClearTextBox();
//十六进制 转 字符串
string hexValues = "48 65 6C 6C 6F 20 57 6F 72 6C 64 21";
HexText.Text = hexValues;
string
C#——串口数据转换例程(十六进制、字节数组、字符串)
最新推荐文章于 2023-12-09 13:09:53 发布