MethodCallExpression Class

System.Linq.Expressions
Represents a method call expression, such as Console.WriteLine().

Inheritance

Remarks

The MethodCallExpression represents a call to a method. It contains information about the method being called, the object on which the method is called (if it's an instance method), and the arguments passed to the method.

Properties

  • Arguments Gets the arguments of the method call.
  • Method Gets the MethodInfo representing the called method.
  • Object Gets the object on which the method is called. For static methods, this property returns null.

Constructors

Arguments Property

System.Collections.ObjectModel.ReadOnlyCollection<Expression> Arguments

Gets the arguments of the method call.
public System.Collections.ObjectModel.ReadOnlyCollection<Expression> Arguments { get; }

Method Property

System.Reflection.MethodInfo Method

Gets the MethodInfo representing the called method.
public System.Reflection.MethodInfo Method { get; }

Object Property

Expression Object

Gets the object on which the method is called. For static methods, this property returns null.
public Expression Object { get; }

Constructors

MethodCallExpression()

Protected constructor for derived types.
protected MethodCallExpression()

See Also