Aspose.Email.Examples.CSharp.Email.Outlook.DisplayInformationOfPSTFile.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( ) : void
Результат void
        public static void Run()
        {
            // The path to the File directory.
            string dataDir = RunExamples.GetDataDir_Outlook();
            string dst = dataDir + "PersonalStorage.pst";

            // load PST file
            PersonalStorage personalStorage = PersonalStorage.FromFile(dst);

            // Get the folders information
            FolderInfoCollection folderInfoCollection = personalStorage.RootFolder.GetSubFolders();

            // Browse through each folder to display folder name and number of messages
            foreach (FolderInfo folderInfo in folderInfoCollection)
            {
                Console.WriteLine("Folder: " + folderInfo.DisplayName);
                Console.WriteLine("Total items: " + folderInfo.ContentCount);
                Console.WriteLine("Total unread items: " + folderInfo.ContentUnreadCount);
                Console.WriteLine("-----------------------------------");
            }
        }
    }
DisplayInformationOfPSTFile