dotnet / dotnet-api-docs

.NET API reference documentation (.NET 5+, .NET Core, .NET Framework)
https://docs.microsoft.com/dotnet/api/
Other
704 stars 1.55k forks source link

Readonly Structs are not shown as 'readonly struct' #4976

Open sonnemaf opened 3 years ago

sonnemaf commented 3 years ago

If a struct is a 'readonly struct' it should show this in the docs. Take a look (for example) at DateTime (.NET Core 3.1)

image

I expected:

public readonly struct DateTime : IComparable, IComparable<DateTime>, IConvertible, IEquatable<DateTime>, IFormattable, System.Runtime.Serialization.ISerializable

The readonly keyword is missing. This is a general problem for all readonly structs in the framework.

KalleOlaviNiemitalo commented 3 years ago

The data seems to be in the XML file already, with version information as well. It's just not displayed at docs.microsoft.com. https://github.com/dotnet/dotnet-api-docs/blob/49f945bc27285a89d843903eef0f0515ba1e625f/xml/System/DateTime.xml#L76-L79