Hello!

Oh ok, thanks. It happens that I was learning reflection from a the C#
language from O'Reilly ... so, could you please recomend me a good book?
I have the thinking in c# too, but the reflection topic comes all in
java ...

Regards,
Carlos.

El jue, 20-03-2003 a las 04:21, Paolo Molaro escribi�:
> On 03/20/03 Carlos Alberto Cortez wrote:
> > Unhandled Exception: System.MissingMethodException: Default constructor
> > not found
> > in <0x0019b> 00 System.Activator:CreateInstance (System.Type,bool)
> > in <0x00031> 00 .ReflectionTest:Main ()
> > 
> > The code I'm writing is the next:
> > 
> > using System;
> > using System.Reflection;
> > 
> >  public class ReflectionTest {
> > 
> >         public static void Main () {
> > 
> >                 Type theMathType = Type.GetType("System.Math");
> >                 Object theObj = Activator.CreateInstance(theMathType);
> > 
> >     }
> >  }
> 
> Your code is buggy: you can't create an instance of System.Math, since
> it has no constructors accessible to you. You'll get the same bug if you
> run your code on the MS runtime.
> 
> lupus
> 
> -- 
> -----------------------------------------------------------------
> [EMAIL PROTECTED]                                     debian/rules
> [EMAIL PROTECTED]                             Monkeys do it better
-- 
--------------------------------------------------
/* The definition of myself */
using Cortez;
using GeniusIntelligence;

public class Carlos : Human, IGenius, ILinuxUser {

        static void Main () {
                Me.Born();
        }

}

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

Reply via email to