What would be a simple way to store a Byte[] array in XML (using C#) ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Use Convert.ToBase64String(byte[])
to convert it to base 64 representation and store the resulting string.
You can get back the byte[]
by calling Convert.FromBase64String(string)
method.