System.Linq.Expressions.Expression.MemberInit C# (CSharp) Method

MemberInit() public static method

Creates a MemberInitExpression.
/// or is null. The property of an element of does not represent a member of the type that .Type represents.
public static MemberInit ( NewExpression newExpression ) : MemberInitExpression
newExpression NewExpression A to set the property equal to.
return MemberInitExpression
        public static MemberInitExpression MemberInit(NewExpression newExpression, params MemberBinding[] bindings)
        {
            return MemberInit(newExpression, (IEnumerable<MemberBinding>)bindings);
        }

Same methods

Expression::MemberInit ( NewExpression newExpression, IEnumerable bindings ) : MemberInitExpression

Usage Example

        public void MemberInit_no_bindings()
        {
            var expression =
                LinqExpression.MemberInit(
                    LinqExpression.New(
                        typeof(SampleClass)));

            ShouldRoundrip(expression);
        }
All Usage Examples Of System.Linq.Expressions.Expression::MemberInit
Expression