Skip to main content

CSharpFactory.FieldDeclaration Method

Containing Type: CSharpFactory

Assembly: Roslynator.CSharp.dll

Overloads

MethodSummary
FieldDeclaration(SyntaxTokenList, TypeSyntax, String, EqualsValueClauseSyntax)
FieldDeclaration(SyntaxTokenList, TypeSyntax, String, ExpressionSyntax)
FieldDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, EqualsValueClauseSyntax)
FieldDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, ExpressionSyntax)

FieldDeclaration(SyntaxTokenList, TypeSyntax, String, EqualsValueClauseSyntax)

public static Microsoft.CodeAnalysis.CSharp.Syntax.FieldDeclarationSyntax FieldDeclaration(Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, string identifier, Microsoft.CodeAnalysis.CSharp.Syntax.EqualsValueClauseSyntax initializer)

Parameters

modifiers SyntaxTokenList

type TypeSyntax

identifier String

initializer EqualsValueClauseSyntax

Returns

FieldDeclarationSyntax

FieldDeclaration(SyntaxTokenList, TypeSyntax, String, ExpressionSyntax)

public static Microsoft.CodeAnalysis.CSharp.Syntax.FieldDeclarationSyntax FieldDeclaration(Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, string identifier, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax? value = null)

Parameters

modifiers SyntaxTokenList

type TypeSyntax

identifier String

value ExpressionSyntax

Returns

FieldDeclarationSyntax

FieldDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, EqualsValueClauseSyntax)

public static Microsoft.CodeAnalysis.CSharp.Syntax.FieldDeclarationSyntax FieldDeclaration(Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.CSharp.Syntax.EqualsValueClauseSyntax? initializer)

Parameters

modifiers SyntaxTokenList

type TypeSyntax

identifier SyntaxToken

initializer EqualsValueClauseSyntax

Returns

FieldDeclarationSyntax

FieldDeclaration(SyntaxTokenList, TypeSyntax, SyntaxToken, ExpressionSyntax)

public static Microsoft.CodeAnalysis.CSharp.Syntax.FieldDeclarationSyntax FieldDeclaration(Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.CSharp.Syntax.TypeSyntax type, Microsoft.CodeAnalysis.SyntaxToken identifier, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax? value = null)

Parameters

modifiers SyntaxTokenList

type TypeSyntax

identifier SyntaxToken

value ExpressionSyntax

Returns

FieldDeclarationSyntax