Skip to content

Attribute type list does not contain decimal #1522

@martingbrown

Description

@martingbrown

Section 21.2.4 defines Attribute parameter types as follows:

21.2.4 Attribute parameter types
The types of positional and named parameters for an attribute class are limited to the attribute parameter types, which are:

One of the following types: bool, byte, char, double, float, int, long, sbyte, short, string, uint, ulong, ushort.

This list of types seems to be quite limited. I was very surprised that I can't use a decimal literal. I expect there is some complex reason why this list is so limited that I'm not aware of, but it would be nice to get decimal on the list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions