CSharpFactory.VariableDeclaration Method
Containing Type: CSharpFactory
Assembly: Roslynator.CSharp.dll
Overloads
VariableDeclaration(TypeSyntax, String, ExpressionSyntax)
public static Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax VariableDeclaration(Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, string identifier, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax? value = null)
Parameters
type TypeSyntax
identifier String
value ExpressionSyntax
Returns
VariableDeclaration(TypeSyntax, SyntaxToken, EqualsValueClauseSyntax)
public static Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax VariableDeclaration(Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.CSharp.Syntax.EqualsValueClauseSyntax? initializer)
Parameters
type TypeSyntax
identifier SyntaxToken
initializer EqualsValueClauseSyntax
Returns
VariableDeclaration(TypeSyntax, SyntaxToken, ExpressionSyntax)
public static Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax VariableDeclaration(Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax? value = null)
Parameters
type TypeSyntax
identifier SyntaxToken
value ExpressionSyntax
Returns
VariableDeclaration(TypeSyntax, VariableDeclaratorSyntax)
public static Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclarationSyntax VariableDeclaration(Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, Microsoft.CodeAnalysis.CSharp.Syntax.VariableDeclaratorSyntax variable)
Parameters
type TypeSyntax
variable VariableDeclaratorSyntax