您的位置:首页 > 移动开发 > Objective-C

C# ExpandoObject用法

2017-07-31 13:08 369 查看
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();
}
}
}

结果:

 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: