Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个整数列表,例如
int[] list = { 350,290,10};
如何将 lits 转换为 Unicode 字符串,其中列表中的项目是字符小数?反之 - Unicode 字符串变成小数列表。
似乎你正在寻找这个:
十进制到 unicode 字符串:
int[] list = { 350, 290, 10 }; System.Text.Encoding encoding = System.Text.Encoding.Unicode; var result = list.Select(i => encoding.GetString(BitConverter.GetBytes(i))).ToList();
您也可以尝试相反的想法,从 unicode 字符串变为十进制。