共用方式為


CSharpExtensions.GetCollectionInitializerSymbolInfo 方法

定義

傳回 'Add' 方法符號 () ,如果有的話,會對應至 內的 Initializer 指定運算式語法。

public static Microsoft.CodeAnalysis.SymbolInfo GetCollectionInitializerSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, System.Threading.CancellationToken cancellationToken = default);
public static Microsoft.CodeAnalysis.SymbolInfo GetCollectionInitializerSymbolInfo (this Microsoft.CodeAnalysis.SemanticModel? semanticModel, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, System.Threading.CancellationToken cancellationToken = default);
static member GetCollectionInitializerSymbolInfo : Microsoft.CodeAnalysis.SemanticModel * Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax * System.Threading.CancellationToken -> Microsoft.CodeAnalysis.SymbolInfo
<Extension()>
Public Function GetCollectionInitializerSymbolInfo (semanticModel As SemanticModel, expression As ExpressionSyntax, Optional cancellationToken As CancellationToken = Nothing) As SymbolInfo

參數

semanticModel
SemanticModel
expression
ExpressionSyntax
cancellationToken
CancellationToken

傳回

適用於