我在C ++ / CLI的项目中使用 ToBase64String
来给像一个字符串 / MnwRx7kRZEQBxLZEkXndA ==
我要将此字符串转换为十六进制再presentation,我该怎么做,在C ++ / CLI或C#?
I use in my C++/CLI project ToBase64String
to give a string like /MnwRx7kRZEQBxLZEkXndA==
I want to convert this string to Hexadecimal representation, How I can do that in C++/CLI or C#?
FromBase64String将采取字符串
到字节
取值
byte[] bytes = Convert.FromBase64String(string s);
然后, BitConverter.ToString()
将一个字节数组到十六进制字符串(的 C#字节[]以十六进制字符串)
Then, BitConverter.ToString()
will convert a byte array to a hex string ( C# byte[] to hex string )
string hex = BitConverter.ToString(data);