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