this is not the way to call a static method in a managed assembly, InteropServices is used to call unmanaged code, tryusing System;
using System.Reflection;class Test
{
public static void Main()
{
Assembly a = Assembly.LoadFrom("ClassLibrary1.dll");
Type t = a.GetType("Class1");
MethodInfo m = t.GetMethod("getNum",BindingFlags.Public | BindingFlags.Static);

if (m != null)
{
int i = (int)m.Invoke(null, new object[]{});
Console.WriteLine(i);
}
}
}