共用方式為


SyntaxFactory.ConditionalExpression Method

Definition

Overloads

ConditionalExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax)

Creates a new ConditionalExpressionSyntax instance.

ConditionalExpression(ExpressionSyntax, ExpressionSyntax, ExpressionSyntax)

Creates a new ConditionalExpressionSyntax instance.

ConditionalExpression(ExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax)

Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs

Creates a new ConditionalExpressionSyntax instance.

public:
 static Microsoft::CodeAnalysis::CSharp::Syntax::ConditionalExpressionSyntax ^ ConditionalExpression(Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ condition, Microsoft::CodeAnalysis::SyntaxToken questionToken, Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ whenTrue, Microsoft::CodeAnalysis::SyntaxToken colonToken, Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ whenFalse);
public static Microsoft.CodeAnalysis.CSharp.Syntax.ConditionalExpressionSyntax ConditionalExpression (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax condition, Microsoft.CodeAnalysis.SyntaxToken questionToken, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax whenTrue, Microsoft.CodeAnalysis.SyntaxToken colonToken, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax whenFalse);
static member ConditionalExpression : Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.ConditionalExpressionSyntax
Public Shared Function ConditionalExpression (condition As ExpressionSyntax, questionToken As SyntaxToken, whenTrue As ExpressionSyntax, colonToken As SyntaxToken, whenFalse As ExpressionSyntax) As ConditionalExpressionSyntax

Parameters

condition
ExpressionSyntax
questionToken
SyntaxToken
whenTrue
ExpressionSyntax
colonToken
SyntaxToken
whenFalse
ExpressionSyntax

Returns

Applies to

ConditionalExpression(ExpressionSyntax, ExpressionSyntax, ExpressionSyntax)

Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs
Source:
Syntax.xml.Main.Generated.cs

Creates a new ConditionalExpressionSyntax instance.

public:
 static Microsoft::CodeAnalysis::CSharp::Syntax::ConditionalExpressionSyntax ^ ConditionalExpression(Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ condition, Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ whenTrue, Microsoft::CodeAnalysis::CSharp::Syntax::ExpressionSyntax ^ whenFalse);
public static Microsoft.CodeAnalysis.CSharp.Syntax.ConditionalExpressionSyntax ConditionalExpression (Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax condition, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax whenTrue, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax whenFalse);
static member ConditionalExpression : Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.ConditionalExpressionSyntax
Public Shared Function ConditionalExpression (condition As ExpressionSyntax, whenTrue As ExpressionSyntax, whenFalse As ExpressionSyntax) As ConditionalExpressionSyntax

Parameters

condition
ExpressionSyntax
whenTrue
ExpressionSyntax
whenFalse
ExpressionSyntax

Returns

Applies to