Aspose.Tasks.Examples.CSharp.WorkingWithProjects.GetNumberOfPages.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // ExStart:GetNumberOfPages
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName);

            // Read the input Project file
            Project project = new Project(dataDir + "GetNumberOfPages.mpp");

            // Get number of pages,  Timescale.Months, Timescale.ThirdsOfMonths
            int iPages = project.GetPageCount();
            iPages = project.GetPageCount(Timescale.Months);
            iPages = project.GetPageCount(Timescale.ThirdsOfMonths);
            // ExEnd:GetNumberOfPages

        }
    }
GetNumberOfPages