[Mono-bugs] [Bug 81507][Nor] New - ConstructorInfo.Invoke should return null when object is specified

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue May 1 13:06:01 EDT 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gert.driesen at pandora.be.


--- shadow/81507	2007-05-01 13:06:01.000000000 -0400
+++ shadow/81507.tmp.18186	2007-05-01 13:06:01.000000000 -0400
@@ -0,0 +1,32 @@
+Bug#: 81507
+Product: Mono: Class Libraries
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: ConstructorInfo.Invoke should return null when object is specified
+When ConstructorInfo.Invoke overloads that accept an object are called 
+and an object is specified, then it should return null.
+From the .NET Framework SDK:
+If this method overload is used to invoke an instance constructor, the 
+object supplied for obj is reinitialized; that is, all instance 
+initializers are executed. The return value is a null reference (Nothing 
+in Visual Basic). 
+Also, when the constructor is invoked on an abstract class then we should 
+throw a MemberAccessException. Right now, a TargetInvocationException 
+wrapping a MethodAccessException is thrown.
+I've committed a NotWorking unit test for this in ConstructorInfoTest.cs.

More information about the mono-bugs mailing list