重定向写入一个文件到流C# [英] Redirect writes to a file to a stream C#
本文介绍了重定向写入一个文件到流C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想问问,如果有可能写入重定向到一个特定的文件,在我的应用程序内存流这样我就可以立即读取它。 如果可能的话,请解释如何做到这一点。
I wanted to ask if it is possible to redirect writes to a specific file, to a memory stream in my application so I can immediately read it. If it is possible please explain how to do so.
感谢。
推荐答案
请确保您的应用程序使用流
,然后你可以使用 MemoryStream的
具体实施来实现流媒体没有的文件。
Make sure your application works with Stream
, and then you can use the MemoryStream
concrete implementation to accomplish streaming without a file.
这篇关于重定向写入一个文件到流C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文