C# ExpandoObject用法
2021-01-25 03:13
标签:this console tle src www obj png tool 添加引用
结果: C# ExpandoObject用法 标签:this console tle src www obj png tool 添加引用 原文地址:https://www.cnblogs.com/lonelyxmas/p/12037678.htmlusing 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();
}
}
}