dotnet / dotnet/dotnet-api-docs
Incorrect source of version information for OperatingSystem class
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
The documentation for the [OperatingSystem.IsAndroidVersionAtLeast](https://learn.microsoft.com/en-us/dotnet/api/system.operatingsystem.isandroidversionatleast?view=net-7.0) method says `returned by the Linux command uname`, but the [documentation comment](https://github.com/dotnet/runtime/blob/v7.0.0/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs#L191) in the source code says `returned by 'ro.build.version.sdk'`.
The documentation for the [OperatingSystem.IsFreeBSDVersionAtLeast](https://learn.microsoft.com/en-us/dotnet/api/system.operatingsystem.isfreebsdversionatleast?view=net-7.0) method says `returned by the Linux command uname`, which is inappropriate because FreeBSD is not Linux.
The [documentation comment](https://github.com/dotnet/runtime/blob/9bc19b7ab7f6bc01e4dbe1a7220a89f5b67d6228/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs#L174) in the source code simply say `returned by 'uname'`.
And, the documentation for the [OperatingSystem.IsMacCatalystVersionAtLeast](https://learn.microsoft.com/en-us/dotnet/api/system.operatingsystem.ismaccatalystversionatleast?view=net-7.0) method says `iOS version as presented in Apple documentation`. Why is there no description of the runtime API that is actually used to obtain the version, as is the case with the other methods?
Also, document says `with a ≤ version comparison`, but the [documentation comment](https://github.com/dotnet/runtime/blob/v7.0.0/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs#L252) in the source code says `with a >= version comparison`.
Contributor guide
Assessment
This issue has not been assessed yet.