如何检查文件夹是ews C#中特定父文件夹的子文件夹 [英] How to check a folder is a child of a particular parent folder in ews C#
本文介绍了如何检查文件夹是ews C#中特定父文件夹的子文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
收件箱
--ONE
---- TWO
----三个
--TWO
--THREE
以上是我收件箱的结构。文件夹名称TWO和THREE存在于文件夹以及ONE的子文件夹中。如何在父文件夹ONE中获取子文件夹TWO的文件夹ID?
我尝试了什么:
Hi,
Inbox
--ONE
----TWO
----THREE
--TWO
--THREE
Above is the structure of my inbox. The folder names "TWO" and "THREE" is there in folders as well as subfolders of "ONE". How can I get the folder id of the child folder of "TWO" in the parent folder "ONE"?
What I have tried:
FindFoldersResults findResults = service.FindFolders(WellKnownFolderName.Inbox, new FolderView(int.MaxValue) { Traversal = FolderTraversal.Deep });
使用这行代码,我获得所有文件夹和子文件夹但无法获取子文件夹ID ONE的文件夹。请帮助。
With this line of code, I get all the folders and sub folders but unable to get the folder id of child folders of "ONE". Please help.
推荐答案
用户递归遍历目录以获取子节点的ID。
如何:通过目录树进行迭代(C#编程指南) [ ^ ]
User recursion to loop through the directory to get the IDs of the child node.
How to: Iterate Through a Directory Tree (C# Programming Guide)[^]
这篇关于如何检查文件夹是ews C#中特定父文件夹的子文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文