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

}

--------------------------------------------------
_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to