EwsGetFolderByName Method
Finds the EwsFolder in the given list by the folder's full name.

Namespace: MailBee.EwsMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.4 build 677 for .NET 4.5
Syntax
public EwsFolder GetFolderByName(
	string folderFullName,
	List<EwsFolder> folders
)

Parameters

folderFullName
Type: SystemString
The full folder name.
folders
Type: System.Collections.GenericListEwsFolder
The list of folders to search.

Return Value

Type: EwsFolder
The reference to the EwsFolder object denoted by the given folder's full name, or a null reference if there is no such folder in the provided list.
Exceptions
ExceptionCondition
MailBeeInvalidArgumentExceptionfolderFullName or folders a null reference (Nothing in Visual Basic).
Remarks

This method does not send anything to the MS Exchange server, neiter it does any I/O at all (therefore it doesn't have an async version). It just performs search over the provided collection. To get the list of folders which you can then supply to this method, you can use DownloadFolders(Boolean) method.

To delimit levels of hierarchy in the folder name, use the same character which is set by FolderLevelDelimiter property. By default, it's '/' (forward slash).

Note Note
Although you could always call a method like DownloadFolderByFullName(String) to find folders, it may not be effective if you need to make multiple folder search queries. If (instead of making a network query each time) you download folders only once and then access the cached list with GetFolderByName(String, ListEwsFolder) method, you'll achieve better performance.
See Also