Skip to content

Expose System.Runtime.CompilerServices.SkipLocalsInitAttribute #25850

@tannergooding

Description

@tannergooding

Rationale

C# is exposing new functionality which allows you to drop the init flag from a method's .local directive (see dotnet/roslyn#25780 for more details).

It would be beneficial if CoreFX/NetStandard exposed this standard type so that users are not required to always manually define this type themselves.

Proposed API

namespace System.Runtime.CompilerServices
{
    [AttributeUsage(AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Event, Inherited = false)]
    public sealed class SkipLocalsInitAttribute : Attribute
    {
        public SkipLocalsInitAttribute()
        {
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions