다음을 통해 공유


ExpressionVisitor.VisitAndConvert<T> Method (T, String)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Visits an expression, casting the result back to the original expression type.

Namespace:  System.Linq.Expressions
Assembly:  System.Core (in System.Core.dll)

Syntax

'Declaration
Public Function VisitAndConvert(Of T As Expression) ( _
    node As T, _
    callerName As String _
) As T
public T VisitAndConvert<T>(
    T node,
    string callerName
)
where T : Expression

Type Parameters

  • T
    The type of the expression.

Parameters

  • node
    Type: T
    The expression to visit.
  • callerName
    Type: System.String
    The name of the calling method; used to report to report a better error message.

Return Value

Type: T
The modified expression, if it or any subexpression was modified; otherwise, returns the original expression.

Exceptions

Exception Condition
InvalidOperationException

The visit method for this node returned a different type.

Version Information

Silverlight

Supported in: 5, 4

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.