

























class Program
{
static void Main(string[] args)
{
dynamic d = Activator.CreateInstance(typeof(DemoType));
object o = d.ToString();
Console.WriteLine(o);
Console.WriteLine(d.Value);
}
}
class DemoType
{
public override string ToString()
{
return "Hello World";
}
public int Value
{
get
{
return 100;
}
}
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。