我必须在 c# 中每 16 个字符后添加或附加 ,(逗号)。此代码为 .txt 格式。请帮助一些示例代码如下:
443322115355524403000000000000001a000000c0604f0060624f0000000000ee3e01000000000050726f626520300050726f6265203000446174612047726f7570000000000000412d5363616e000047723a310000000044656661756c74204265616d0000000047617465204d61696e2028412d5363616e2900000000000000790000407b0000807d0000c07f0000008200004084000080860000c0880000008b0000408d0000808f0000c0910000009400004096000080980000c09a0000009d0000409f000080a10000c0a3000000a6000040a8000080aa0000c0ac000000af000040b1000080b30000c0b5000000b8000040ba000080bc0000c0be000000c1000040c3000080c50000c0c7000000ca000040cc000080ce0000c0d0000000d3000040d5000080d70000c0d9000000dc000040de000080e00000c0e2000000e5000040e7000080e90000c0eb000000ee000040f0000080f20000c0f4000000f7000040f9000080fb0000c0fd0000000001004002010080040100c006010000090100400b0100800d0100c00f0100001201004014010080160100c0180100001b0100401d0100801f0100c0210100002401004026010080280100c02a0100002d0100402f010080310100c03301000036010040380100803a0100c03c0100003f01004041010080430100c045010000480100404a0100804c0100c04e0100005101004053010080550100c0570100005a0100405c0100805e0100c06001000"
我努力了
using (StreamReader reader = new StreamReader(fileStream))
{
string linesFromFile = String.Concat(bin.Select(b => b.ToString("x2")));
linesFromFile.Split(',');
richTextBox1.Text = linesFromFile;
}