using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LocalVariables
{
    class Examples6_7
    {
        public static void ImplicitlyTypedDeclarations()
        {
            // Example 2-6
            var part1 = "the ultimate question";
            var part2 = "of something";
            var theAnswer = 40 + 2;


            // Example 2-7 (commented out because it's a deliberate error)
            //var theAnswer = 42;
            //theAnswer = "The compiler will reject this"; 

            Console.WriteLine(part1 + " " + part2 + " is " + theAnswer);
        }
    }
}
