AcornPublishing_essential-csharp-7e/EssentialCSharp-8.0/src/Chapter19/Listing19.11.UsingTaskRun.cs
namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter19.Listing19_11
{
    using System.Threading.Tasks;

    public class Program
    {
        public Task<string> CalculatePiAsync(int digits)
        {
            return Task.Factory.StartNew<string>(
                () => CalculatePi(digits));
        }

        private string CalculatePi(int digits)
        {
            // ...

            return string.Empty;
        }
    }
}

