Read a file from a resource and write it to disk in C#

前端 未结 3 479
无人共我
无人共我 2021-01-22 05:32

I have some files, which are embedded in a resource. How can I save these files on disk via C#?

3条回答
  •  渐次进展
    2021-01-22 06:04

    using streams: GetManifestResourceStream gives you a stream to the file in the resource and using a StreamWriter you can write the contents of that stream to disk.

提交回复
热议问题