如何使用C#读取字节文件中的.msg大小

发布于 2025-01-29 12:24:29 字数 242 浏览 2 评论 0原文

我有一个Outlook .msg文件,该文件被视为附件文件。我想使用C#计算其在字节中的大小。我可以使用MSGREADER计算出.msg文件以外的其他文件格式的大小。问题是MSGreader中的.msg文件类型是msgreader.outlook.storage.storage.message,而不是msgreader.outlook.storage.attarachment。因此,我无法获得其数据属性。我认为解决方案是将消息类型转换为附件类型,但我不知道该怎么做。

I have an outlook .msg file that is treated as an attachment file. I want to calculate its size in byte using C#. I can calculate the size of other file formats other than .msg file using MsgReader. The problem is that the .msg file type in MsgReader is MsgReader.Outlook.Storage.Message and not MsgReader.Outlook.Storage.Attachment. So I cannot get its Data property. I think the solution is to convert Message type to Attachment type but I don't know how to do it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文