Insert image into xml file using c#

前端 未结 5 1828
深忆病人
深忆病人 2020-12-31 08:47

I\'ve looked everywhere for the answer to this question but cant find anything so hoping you guys can help me on here.

Basically I want to insert an image into an el

5条回答
  •  一个人的身影
    2020-12-31 09:12

    1. Read all the bytes into memory using File.ReadAllBytes().
    2. Convert the bytes to a Base64 string using Convert.ToBase64String().
    3. Write the Base64 Encoded string to your element content.

    Doneski!

提交回复
热议问题