dotnet / dotnet/csharpstandard
Attribute type list does not contain decimal
Open
- Dominant language
- C#
- Stars
- 815
- Forks
- 99
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 16
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.