I think that the Public folders cannot be accessed using IMAP in general. Please see the following discussion on Microsoft forum.
However, you can still try it yourself with free trial version like this:
Imap imap = new Imap();
imap.Connect("servername");
imap.Login("username", "password");
// print the folder list
foreach (ImapFolder item in imap.GetFolderList())
{
Console.WriteLine(item.Name);
}
// select desired folder
imap.SelectFolder("folder");
// do some work…