Table of Contents

Class ParenthesizedExpression

Namespace
ICSharpCode.Decompiler.CSharp.Syntax
Assembly
ICSharpCode.Decompiler.dll

( Expression )

public class ParenthesizedExpression : Expression, IAnnotatable, IFreezable, INode, ICloneable
Inheritance
ParenthesizedExpression
Implements
Inherited Members
Extension Methods

Constructors

ParenthesizedExpression()

public ParenthesizedExpression()

ParenthesizedExpression(Expression)

public ParenthesizedExpression(Expression expr)

Parameters

expr Expression

Properties

Expression

public Expression Expression { get; set; }

Property Value

Expression

LParToken

public CSharpTokenNode LParToken { get; }

Property Value

CSharpTokenNode

RParToken

public CSharpTokenNode RParToken { get; }

Property Value

CSharpTokenNode

Methods

AcceptVisitor(IAstVisitor)

public override void AcceptVisitor(IAstVisitor visitor)

Parameters

visitor IAstVisitor

AcceptVisitor<T>(IAstVisitor<T>)

public override T AcceptVisitor<T>(IAstVisitor<T> visitor)

Parameters

visitor IAstVisitor<T>

Returns

T

Type Parameters

T

AcceptVisitor<T, S>(IAstVisitor<T, S>, T)

public override S AcceptVisitor<T, S>(IAstVisitor<T, S> visitor, T data)

Parameters

visitor IAstVisitor<T, S>
data T

Returns

S

Type Parameters

T
S

ActsAsParenthesizedExpression(AstNode)

Gets whether the expression acts like a parenthesized expression, i.e. whether information about the expected type (for lambda type inference) flows into the inner expression.

public static bool ActsAsParenthesizedExpression(AstNode expression)

Parameters

expression AstNode

Returns

bool

Returns true for ParenthesizedExpression, CheckedExpression or UncheckedExpression; false otherwise.

DoMatch(AstNode, Match)

protected override bool DoMatch(AstNode other, Match match)

Parameters

other AstNode
match Match

Returns

bool

UnpackParenthesizedExpression(Expression)

Unpacks the given expression if it is a ParenthesizedExpression, CheckedExpression or UncheckedExpression.

public static Expression UnpackParenthesizedExpression(Expression expr)

Parameters

expr Expression

Returns

Expression