[Mono-list] Reflection problem

Carlos Alberto Cortez is118149@mail.udlap.mx
14 Mar 2003 10:26:12 -0600


Hello there:

Yesterday I began to have fun with reflection. But I had a problem, when
I wrote this code:

using System;
using System.Reflection;

 public class ReflectionTest {

        public static void Main () {

                Type theMathType = Type.GetType("System.Math");
                Object theObj = Activator.CreateInstance(theMathType);

        }

 }

When I compile it, no error messages are shown, but when i try to run
it, the next message appears:

Unhandled Exception: System.MissingMethodException: Default constructor
not found
in <0x0019b> 00 System.Activator:CreateInstance (System.Type,bool)
in <0x00031> 00 .ReflectionTest:Main ()

have anybody any idea about this problem?

Regargds,
Carlos.

-- 
--------------------------------------------------
/* The definition of myself */
using Cortez;
using GeniusIntelligence;

public class Carlos : Human, IGenius, ILinuxUser {

	static void Main () {

		Me.Run();

	}

	static string PHON : 2 34 31 63
	static string NICKNAME : Zero

}

--------------------------------------------------