ExpressionVisitor.VisitAndConvert<T> Method (ReadOnlyCollection<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) ( _
    nodes As ReadOnlyCollection(Of T), _
    callerName As String _
) As ReadOnlyCollection(Of T)
public ReadOnlyCollection<T> VisitAndConvert<T>(
    ReadOnlyCollection<T> nodes,
    string callerName
)
where T : Expression

Type Parameters

  • T
    The type of the expression.

Parameters

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

Return Value

Type: System.Collections.ObjectModel.ReadOnlyCollection<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.