码迷,mamicode.com
首页 > Windows程序 > 详细

C# ExpandoObject用法

时间:2017-07-31 14:33:09      阅读:292      评论:0      收藏:0      [点我收藏+]

标签:分享   style   http   添加引用   div   sys   成功   技术   dynamic   

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Dynamic;//添加引用

namespace ExpandoObject_exercise
{
    class Program
    {
        static void Main(string[] args)
        {
            dynamic expand = new ExpandoObject();
            expand.name = "dynamic动态";
            expand.yes = "成功";
            Console.WriteLine("{0}\n{1}", expand.name, expand.yes);
            Console.Read();
        }
    }
}

结果:

技术分享

 

C# ExpandoObject用法

标签:分享   style   http   添加引用   div   sys   成功   技术   dynamic   

原文地址:http://www.cnblogs.com/lbonet/p/7262610.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!