开发者

EWS: How to get created folder?

For those well known folder we can use WellKnownFolderName.Inbox to get inbox folder, but for those created by users, how to set searchFilter to get them? I found that all user created folder has a common property that the FolderClass is null, but when I use SearchFilter searchFilter = new SearchFilter.IsEqua开发者_高级运维lTo(FolderSchema.FolderClass, null); error happens. It says "Either the OtherPropertyDefinition or the Value properties must be set." Any idea?


Use

var folders = service.FindFolders(WellKnownFolderName.MsgFolderRoot, 
    new SearchFilter.IsEqualTo(FolderSchema.DisplayName, "name"), 
    new FolderView(1));

This will return the first folder named "name".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜