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".
精彩评论