모두, 런타임시 내 애플리케이션에서 호출 할 C# DLL 수가 System.Reflection
입니다. 내가 사용하는 핵심 코드는 내가이 DLL 내부에 무슨 일이 있었는지에서 정보를 추출 할 수 있도록 내가 ref
로 DLL에 매개 변수의 배열을 전달하는 방법을 알고 싶습니다리플렉션을 통해 C# DLL에 대한 참조로 파라미터 배열 전달
DLL = Assembly.LoadFrom(Path.GetFullPath(strDllName));
classType = DLL.GetType(String.Format("{0}.{0}", strNameSpace, strClassName));
if (classType != null)
{
classInstance = Activator.CreateInstance(classType);
MethodInfo methodInfo = classType.GetMethod(strMethodName);
if (methodInfo != null)
{
object result = null;
result = methodInfo.Invoke(classInstance, parameters);
return Convert.ToBoolean(result);
}
}
같은 것입니다. 내가 원하는 (하지만 물론 컴파일되지 않습니다) 어떤 명확한 묘사는 내가 이것을 달성 할 수있는 방법
result = methodInfo.Invoke(classInstance, ref parameters);
것입니까?
도움이 될만한 정보가 있습니다. http://stackoverflow.com/questions/1551761/ref-parameters-and-reflection – Dennis