public object GetStaticProperty(string TypeName, string Property)
{
SetError();
Type type = GetTypeFromName(TypeName);
if (type == null)
{
SetError("Type is not loaded. Please make sure you call LoadAssembly first.");
return null;
}
object val = null;
try
{
val = type.InvokeMember(Property, BindingFlags.Static | BindingFlags.Public | BindingFlags.GetField | BindingFlags.GetProperty, null, type, null);
val = FixupReturnValue(val);
}
catch (Exception ex)
{
SetError(ex.GetBaseException(), true);
throw ex.GetBaseException();
}
return val;
}