D
Daniel
how do i access methods when the .net assembly was loaded with late biding?
class Class1
{
public static void Main()
{
System.Reflection.Assembly SampleAssembly;
SampleAssembly =
System.Reflection.Assembly.LoadFrom("C:\\SimpleSolutions\\asmload\\asmtoload
\\bin\\Debug\\asmtoload.dll");
System.Type[] Types = SampleAssembly.GetTypes();
foreach (System.Type oType in Types)
{
System.Console.WriteLine(oType.Name.ToString());
string strName = oType.Name.ToString();
System.Object pObj = SampleAssembly.CreateInstance("asmtoload" + "." +
strName);
//System.Console.WriteLine(pObj.IOCTL("foo")); THIS IS A BUILD ERROR
BECAUSE IOCTL method is not accessible, how to access method if type info of
dynamicaly loaded dll?
System.Threading.Thread.Sleep(5000);
}
}
}
class Class1
{
public static void Main()
{
System.Reflection.Assembly SampleAssembly;
SampleAssembly =
System.Reflection.Assembly.LoadFrom("C:\\SimpleSolutions\\asmload\\asmtoload
\\bin\\Debug\\asmtoload.dll");
System.Type[] Types = SampleAssembly.GetTypes();
foreach (System.Type oType in Types)
{
System.Console.WriteLine(oType.Name.ToString());
string strName = oType.Name.ToString();
System.Object pObj = SampleAssembly.CreateInstance("asmtoload" + "." +
strName);
//System.Console.WriteLine(pObj.IOCTL("foo")); THIS IS A BUILD ERROR
BECAUSE IOCTL method is not accessible, how to access method if type info of
dynamicaly loaded dll?
System.Threading.Thread.Sleep(5000);
}
}
}