Skip to content

Add NullableAttribute #29039

@terrajobst

Description

@terrajobst

Right now, the C# compiler code spits the attribute. We should add expose them to avoid having to spread them everywhere.

namespace System.Runtime.CompilerServices
{
    [AttributeUsage(
        AttributeTargets.Class |
        AttributeTargets.GenericParameter |
        AttributeTargets.Event |
        AttributeTargets.Field |
        AttributeTargets.Property |
        AttributeTargets.Parameter |
        AttributeTargets.ReturnValue)]
    public sealed class NullableAttribute : Attribute
    {
        public NullableAttribute(byte flag);
        public NullableAttribute(byte[] flags);
        public ReadOnlySpan<byte> Flags { get; }
    }
}

/cc @dotnet/ldm @dotnet/fxdc

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions