示例#1
0
        static void Main(string[] args)
        {
            dynamic vessel = new MyExpandObject();
            vessel.Name = "Little Miss Understood";
            vessel.Age = 12;
            vessel.KeelLengthInFeet = 32;
            vessel.Longitude = 37.55f;

            Console.WriteLine("the {0} year old vessel" +
                "named {1} has a keel length of {2} feet",
                vessel.AGE, vessel.nAme, vessel.keelLengthInfeet);

            Console.ReadKey();
        }
示例#2
0
        static void Main(string[] args)
        {
            dynamic vessel = new MyExpandObject();

            vessel.Name             = "Little Miss Understood";
            vessel.Age              = 12;
            vessel.KeelLengthInFeet = 32;
            vessel.Longitude        = 37.55f;

            Console.WriteLine("the {0} year old vessel" +
                              "named {1} has a keel length of {2} feet",
                              vessel.AGE, vessel.nAme, vessel.keelLengthInfeet);

            Console.ReadKey();
        }