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

namespace DynamicDetails
{
    class Examples17_18
    {
        public static void UseExpando()
        {
            // Listing 14-17
            dynamic ex = new ExpandoObject();
            ex.X = 12.3;
            ex.Y = 34.5;
            ex.Name = "Point";
            Console.WriteLine("{0}: {1}, {2}", ex.Name, ex.X, ex.Y);

            // Listing 14-18
            IDictionary<string, object> exd = ex;
            Console.WriteLine("{0}: {1}, {2}", exd["Name"], exd["X"], exd["Y"]);
        }
    }
}
