SyntaxFactory.AccessorDeclaration 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
AccessorDeclaration(SyntaxKind)
建立新的存取子DeclarationSyntax 實例。
public:
static Microsoft::CodeAnalysis::CSharp::Syntax::AccessorDeclarationSyntax ^ AccessorDeclaration(Microsoft::CodeAnalysis::CSharp::SyntaxKind kind);
public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax AccessorDeclaration (Microsoft.CodeAnalysis.CSharp.SyntaxKind kind);
static member AccessorDeclaration : Microsoft.CodeAnalysis.CSharp.SyntaxKind -> Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax
Public Shared Function AccessorDeclaration (kind As SyntaxKind) As AccessorDeclarationSyntax
參數
- kind
- SyntaxKind
傳回
適用於
AccessorDeclaration(SyntaxKind, BlockSyntax)
建立新的存取子DeclarationSyntax 實例。
public:
static Microsoft::CodeAnalysis::CSharp::Syntax::AccessorDeclarationSyntax ^ AccessorDeclaration(Microsoft::CodeAnalysis::CSharp::SyntaxKind kind, Microsoft::CodeAnalysis::CSharp::Syntax::BlockSyntax ^ body);
public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax AccessorDeclaration (Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax body);
public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax AccessorDeclaration (Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax? body);
static member AccessorDeclaration : Microsoft.CodeAnalysis.CSharp.SyntaxKind * Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax
Public Shared Function AccessorDeclaration (kind As SyntaxKind, body As BlockSyntax) As AccessorDeclarationSyntax
參數
- kind
- SyntaxKind
- body
- BlockSyntax
傳回
適用於
AccessorDeclaration(SyntaxKind, SyntaxList<AttributeListSyntax>, SyntaxTokenList, ArrowExpressionClauseSyntax)
public:
static Microsoft::CodeAnalysis::CSharp::Syntax::AccessorDeclarationSyntax ^ AccessorDeclaration(Microsoft::CodeAnalysis::CSharp::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::CSharp::Syntax::ArrowExpressionClauseSyntax ^ expressionBody);
public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax AccessorDeclaration (Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.CSharp.Syntax.ArrowExpressionClauseSyntax expressionBody);
static member AccessorDeclaration : Microsoft.CodeAnalysis.CSharp.SyntaxKind * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.CSharp.Syntax.ArrowExpressionClauseSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax
Public Shared Function AccessorDeclaration (kind As SyntaxKind, attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, expressionBody As ArrowExpressionClauseSyntax) As AccessorDeclarationSyntax
參數
- kind
- SyntaxKind
- attributeLists
- SyntaxList<AttributeListSyntax>
- modifiers
- SyntaxTokenList
- expressionBody
- ArrowExpressionClauseSyntax
傳回
適用於
AccessorDeclaration(SyntaxKind, SyntaxList<AttributeListSyntax>, SyntaxTokenList, BlockSyntax)
public:
static Microsoft::CodeAnalysis::CSharp::Syntax::AccessorDeclarationSyntax ^ AccessorDeclaration(Microsoft::CodeAnalysis::CSharp::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::CSharp::Syntax::BlockSyntax ^ body);
public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax AccessorDeclaration (Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax body);
static member AccessorDeclaration : Microsoft.CodeAnalysis.CSharp.SyntaxKind * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax
Public Shared Function AccessorDeclaration (kind As SyntaxKind, attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, body As BlockSyntax) As AccessorDeclarationSyntax
參數
- kind
- SyntaxKind
- attributeLists
- SyntaxList<AttributeListSyntax>
- modifiers
- SyntaxTokenList
- body
- BlockSyntax
傳回
適用於
AccessorDeclaration(SyntaxKind, SyntaxList<AttributeListSyntax>, SyntaxTokenList, BlockSyntax, ArrowExpressionClauseSyntax)
建立新的存取子DeclarationSyntax 實例。
public:
static Microsoft::CodeAnalysis::CSharp::Syntax::AccessorDeclarationSyntax ^ AccessorDeclaration(Microsoft::CodeAnalysis::CSharp::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::CSharp::Syntax::BlockSyntax ^ body, Microsoft::CodeAnalysis::CSharp::Syntax::ArrowExpressionClauseSyntax ^ expressionBody);
public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax AccessorDeclaration (Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax body, Microsoft.CodeAnalysis.CSharp.Syntax.ArrowExpressionClauseSyntax expressionBody);
public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax AccessorDeclaration (Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax? body, Microsoft.CodeAnalysis.CSharp.Syntax.ArrowExpressionClauseSyntax? expressionBody);
static member AccessorDeclaration : Microsoft.CodeAnalysis.CSharp.SyntaxKind * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax * Microsoft.CodeAnalysis.CSharp.Syntax.ArrowExpressionClauseSyntax -> Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax
Public Shared Function AccessorDeclaration (kind As SyntaxKind, attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, body As BlockSyntax, expressionBody As ArrowExpressionClauseSyntax) As AccessorDeclarationSyntax
參數
- kind
- SyntaxKind
- attributeLists
- SyntaxList<AttributeListSyntax>
- modifiers
- SyntaxTokenList
- body
- BlockSyntax
- expressionBody
- ArrowExpressionClauseSyntax
傳回
適用於
AccessorDeclaration(SyntaxKind, SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, ArrowExpressionClauseSyntax, SyntaxToken)
public:
static Microsoft::CodeAnalysis::CSharp::Syntax::AccessorDeclarationSyntax ^ AccessorDeclaration(Microsoft::CodeAnalysis::CSharp::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken keyword, Microsoft::CodeAnalysis::CSharp::Syntax::ArrowExpressionClauseSyntax ^ expressionBody, Microsoft::CodeAnalysis::SyntaxToken semicolonToken);
public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax AccessorDeclaration (Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken keyword, Microsoft.CodeAnalysis.CSharp.Syntax.ArrowExpressionClauseSyntax expressionBody, Microsoft.CodeAnalysis.SyntaxToken semicolonToken);
static member AccessorDeclaration : Microsoft.CodeAnalysis.CSharp.SyntaxKind * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.ArrowExpressionClauseSyntax * Microsoft.CodeAnalysis.SyntaxToken -> Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax
Public Shared Function AccessorDeclaration (kind As SyntaxKind, attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, keyword As SyntaxToken, expressionBody As ArrowExpressionClauseSyntax, semicolonToken As SyntaxToken) As AccessorDeclarationSyntax
參數
- kind
- SyntaxKind
- attributeLists
- SyntaxList<AttributeListSyntax>
- modifiers
- SyntaxTokenList
- keyword
- SyntaxToken
- expressionBody
- ArrowExpressionClauseSyntax
- semicolonToken
- SyntaxToken
傳回
適用於
AccessorDeclaration(SyntaxKind, SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, BlockSyntax, SyntaxToken)
public:
static Microsoft::CodeAnalysis::CSharp::Syntax::AccessorDeclarationSyntax ^ AccessorDeclaration(Microsoft::CodeAnalysis::CSharp::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken keyword, Microsoft::CodeAnalysis::CSharp::Syntax::BlockSyntax ^ body, Microsoft::CodeAnalysis::SyntaxToken semicolonToken);
public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax AccessorDeclaration (Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken keyword, Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax body, Microsoft.CodeAnalysis.SyntaxToken semicolonToken);
static member AccessorDeclaration : Microsoft.CodeAnalysis.CSharp.SyntaxKind * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax * Microsoft.CodeAnalysis.SyntaxToken -> Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax
Public Shared Function AccessorDeclaration (kind As SyntaxKind, attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, keyword As SyntaxToken, body As BlockSyntax, semicolonToken As SyntaxToken) As AccessorDeclarationSyntax
參數
- kind
- SyntaxKind
- attributeLists
- SyntaxList<AttributeListSyntax>
- modifiers
- SyntaxTokenList
- keyword
- SyntaxToken
- body
- BlockSyntax
- semicolonToken
- SyntaxToken
傳回
適用於
AccessorDeclaration(SyntaxKind, SyntaxList<AttributeListSyntax>, SyntaxTokenList, SyntaxToken, BlockSyntax, ArrowExpressionClauseSyntax, SyntaxToken)
建立新的存取子DeclarationSyntax 實例。
public:
static Microsoft::CodeAnalysis::CSharp::Syntax::AccessorDeclarationSyntax ^ AccessorDeclaration(Microsoft::CodeAnalysis::CSharp::SyntaxKind kind, Microsoft::CodeAnalysis::SyntaxList<Microsoft::CodeAnalysis::CSharp::Syntax::AttributeListSyntax ^> attributeLists, Microsoft::CodeAnalysis::SyntaxTokenList modifiers, Microsoft::CodeAnalysis::SyntaxToken keyword, Microsoft::CodeAnalysis::CSharp::Syntax::BlockSyntax ^ body, Microsoft::CodeAnalysis::CSharp::Syntax::ArrowExpressionClauseSyntax ^ expressionBody, Microsoft::CodeAnalysis::SyntaxToken semicolonToken);
public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax AccessorDeclaration (Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken keyword, Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax body, Microsoft.CodeAnalysis.CSharp.Syntax.ArrowExpressionClauseSyntax expressionBody, Microsoft.CodeAnalysis.SyntaxToken semicolonToken);
public static Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax AccessorDeclaration (Microsoft.CodeAnalysis.CSharp.SyntaxKind kind, Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> attributeLists, Microsoft.CodeAnalysis.SyntaxTokenList modifiers, Microsoft.CodeAnalysis.SyntaxToken keyword, Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax? body, Microsoft.CodeAnalysis.CSharp.Syntax.ArrowExpressionClauseSyntax? expressionBody, Microsoft.CodeAnalysis.SyntaxToken semicolonToken);
static member AccessorDeclaration : Microsoft.CodeAnalysis.CSharp.SyntaxKind * Microsoft.CodeAnalysis.SyntaxList<Microsoft.CodeAnalysis.CSharp.Syntax.AttributeListSyntax> * Microsoft.CodeAnalysis.SyntaxTokenList * Microsoft.CodeAnalysis.SyntaxToken * Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax * Microsoft.CodeAnalysis.CSharp.Syntax.ArrowExpressionClauseSyntax * Microsoft.CodeAnalysis.SyntaxToken -> Microsoft.CodeAnalysis.CSharp.Syntax.AccessorDeclarationSyntax
Public Shared Function AccessorDeclaration (kind As SyntaxKind, attributeLists As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, keyword As SyntaxToken, body As BlockSyntax, expressionBody As ArrowExpressionClauseSyntax, semicolonToken As SyntaxToken) As AccessorDeclarationSyntax
參數
- kind
- SyntaxKind
- attributeLists
- SyntaxList<AttributeListSyntax>
- modifiers
- SyntaxTokenList
- keyword
- SyntaxToken
- body
- BlockSyntax
- expressionBody
- ArrowExpressionClauseSyntax
- semicolonToken
- SyntaxToken