class="brush:csharp;gutter:true;">var dogType = System.Reflection.Assembly.Load("bigs").GetType("bigs.big");//注意:命名空间加上类名! dynamic dog = Activator.CreateInstance(dogType); dog.Speak(); dynamic expando = new System.Dynamic.ExpandoObject(); expando.Name = "chenxiaofeng"; expando.Speak = new Action(() => Console.WriteLine("My name is {0}", expando.Name)); expando.Speak();