[Mono-bugs] [Bug 396986] New: Activator.CreateInstance bad message when no default c' tor

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jun 4 04:34:56 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=396986


           Summary: Activator.CreateInstance bad message when no default
                    c'tor
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: andyhume32 at yahoo.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=220014)
 --> (https://bugzilla.novell.com/attachment.cgi?id=220014)
A wee test program

Activator.CreateInstance passed a type lacking a default constructor, produces
MissingMethodException with:
    Method not found: 'Default constructor not found...ctor() of FooBar'.

Hmm three dots, confusing…

It's mis-created by Activator.CreateInstance(Type,bool) at line 307 as:
[[
throw new MissingMethodException (Locale.GetText ("Default constructor not
found."),
        ".ctor() of " + type.FullName);
]]

Simply remove the second argument, to call the normal "(String message)"
overload.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list