Getting a Hierarchy of Outlook Folders With Their Entry ID

Simple console application to output a hierarchy of Outlook folders, with their Entry ID, using NetOffice.

using System;

namespace OutlookFolderIdGrabber
{
    public class Program
    {
        public static void Main(string[] args)
        {
            using (var application = new NetOffice.OutlookApi.Application())
            {
                DisplayFolder(application.Session.DefaultStore.GetRootFolder());
            }
        }

        private static void DisplayFolder(NetOffice.OutlookApi.MAPIFolder folder, int level = 0)
        {
            Console.WriteLine($"{new string(' ', level)}{folder.Name} : {folder.EntryID}");

            foreach (NetOffice.OutlookApi.MAPIFolder childFolder in folder.Folders)
            {
                DisplayFolder(childFolder, level + 1);
            }
        }
    }
}
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="NetOffice.Core" version="1.7.3.0" targetFramework="net461" />
  <package id="NetOffice.Outlook" version="1.7.3.0" targetFramework="net461" />
</packages>