dynamic을 사용하여 외부 DLL 참조 추가

487 단어 dynamic
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();


좋은 웹페이지 즐겨찾기