Programing/C#
Reflection 리플렉션 사용하기
즐거운 개발자
2012. 12. 12. 11:16
반응형
Assembly assembly = Assembly.LoadFrom("파일 경로(DLL)");
Type type = assembly.GetType("형식전체이름(네임스페이스//클래스)", true);
object instance = Activator.CreateInstance(type, true); //객체 생성
MethodInfo methodInfo = type.GetMethod("매쏘드 이름"); //메쏘드 실행
methodInfo.Invoke(instance, new object[] { 인자,인자 });