Skip to main content

CSharpFactory.LocalDeclarationStatement Method

Containing Type: CSharpFactory

Assembly: Roslynator.CSharp.dll

Overloads

MethodSummary
LocalDeclarationStatement(TypeSyntax, String, EqualsValueClauseSyntax)
LocalDeclarationStatement(TypeSyntax, String, ExpressionSyntax)
LocalDeclarationStatement(TypeSyntax, SyntaxToken, EqualsValueClauseSyntax)
LocalDeclarationStatement(TypeSyntax, SyntaxToken, ExpressionSyntax)

LocalDeclarationStatement(TypeSyntax, String, EqualsValueClauseSyntax)

public static Microsoft.CodeAnalysis.CSharp.Syntax.LocalDeclarationStatementSyntax LocalDeclarationStatement(Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, string identifier, Microsoft.CodeAnalysis.CSharp.Syntax.EqualsValueClauseSyntax initializer)

Parameters

type TypeSyntax

identifier String

initializer EqualsValueClauseSyntax

Returns

LocalDeclarationStatementSyntax

LocalDeclarationStatement(TypeSyntax, String, ExpressionSyntax)

public static Microsoft.CodeAnalysis.CSharp.Syntax.LocalDeclarationStatementSyntax LocalDeclarationStatement(Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, string identifier, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax? value = null)

Parameters

type TypeSyntax

identifier String

value ExpressionSyntax

Returns

LocalDeclarationStatementSyntax

LocalDeclarationStatement(TypeSyntax, SyntaxToken, EqualsValueClauseSyntax)

public static Microsoft.CodeAnalysis.CSharp.Syntax.LocalDeclarationStatementSyntax LocalDeclarationStatement(Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.CSharp.Syntax.EqualsValueClauseSyntax initializer)

Parameters

type TypeSyntax

identifier SyntaxToken

initializer EqualsValueClauseSyntax

Returns

LocalDeclarationStatementSyntax

LocalDeclarationStatement(TypeSyntax, SyntaxToken, ExpressionSyntax)

public static Microsoft.CodeAnalysis.CSharp.Syntax.LocalDeclarationStatementSyntax LocalDeclarationStatement(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

LocalDeclarationStatementSyntax