ICollectionExpressionOperation.ConstructMethod Property

Definition

Method used to construct the collection.

  1. If the collection type is an array, span, or type parameter, the method is null.
  2. If the collection type has a [CollectionBuilder] attribute, the method is the builder method.
  3. If the collection type is a mutable array interface and the collection was initialized with arguments, the method is the constructor of List<T> that was used. If this is read-only array interface, or no arguments were provided, the method is null
  4. Otherwise, the method is the collection type constructor.
public Microsoft.CodeAnalysis.IMethodSymbol? ConstructMethod { get; }
member this.ConstructMethod : Microsoft.CodeAnalysis.IMethodSymbol
Public ReadOnly Property ConstructMethod As IMethodSymbol

Property Value

Applies to