Expression.New overload throws an exception when "members" param is null, contradicting docs - by sinelaw

Status : 


Sign in
to vote
ID 786044 Comments
Status Active Workarounds
Type Bug Repros 0
Opened 5/1/2013 3:19:48 PM
Access Restriction Public


This bug is in the following overload of Expression.New (in System.Linq.Expressions):

public static NewExpression New(
	ConstructorInfo constructor,
	IEnumerable<Expression> arguments,
	IEnumerable<MemberInfo> members

The documentation states:

>   If members is not null, it must have the same number of elements as arguments

The actual behavior is that the method throws an exception *even if "members" is null*, and there are more than 0 items in "arguments".

The exception reads:

>    Incorrect number of arguments for the given members

Sign in to post a comment.
Posted by Microsoft on 5/10/2013 at 1:09 AM
Hi, given that we have not heard back from you in these days. We will go ahead and close this Connect Issue. If you get a chance to review and provide the information requested earlier, you can go ahead and reactivate this issue.
Posted by Microsoft on 5/7/2013 at 1:47 AM
I am currently standing by for an update from you and would like to know how things are going on your end. If you could get back to me at your earliest convenience with information I request, we will be able to make headway towards a resolution. I look forward to hearing from you.
Posted by Microsoft on 5/1/2013 at 10:15 PM
I am having trouble reproducing your issue. Can you share a sample project on which you are seeing this problem?

Posted by Microsoft on 5/1/2013 at 3:51 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(