DD07090002000A0009001F002300430289 怎么解码?
DD07090002000A0009001F002300430289
怎么用vb解码上面的数据
数据格式如下
typedef struct _SYSTEMTIME {
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME
[解决办法]
0020003100330030003400320033003100390038003800310031003100380034003300
这个看上去是unicode的字符串
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
string s = "0020003100330030003400320033003100390038003800310031003100380034003300";
byte[] b = Regex.Matches(s, "\\w{2}").Cast<Match>().Select(x => Convert.ToByte(x.Value, 16)).ToArray();
string result = Encoding.BigEndianUnicode.GetString(b);
Console.WriteLine(result);
}
}
}