Skip to content

[API Proposal]: ParamCollectionAttribute #99285

@AlekseyTs

Description

@AlekseyTs

Background and motivation

As part of supporting Params Collections feature, we need a new attribute that will be applied by C# compiler to non-array params parameters.

API Proposal

This is effectively a clone of ParamArrayAttribute, different namespace, different name, different meaning.
See https://github.com/dotnet/csharplang/blob/main/proposals/params-collections.md#metadata

namespace System.Runtime.CompilerServices
{
    [AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)]
    public sealed class ParamCollectionAttribute : Attribute
    {
        public ParamCollectionAttribute() { }
    }
}

API Usage

Not meant for use in C# code.

Alternative Designs

No response

Risks

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions