dotnet / dotnet/dotnet-api-docs

Consider adding more examples for OperatingSystem

Open
#3,336 7 comments 0 reactions 0 assignees View on GitHub
area-System.Runtime doc-enhancement Pri3 waiting-on-feedback
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

MS Docs page: https://docs.microsoft.com/en-us/dotnet/api/system.operatingsystem?view=netcore-3.0
https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System/OperatingSystem.xml

The example only shows result examples for Windows 8.1 and 7. We should add an example for Windows 10 and a few non-Windows results, if supported (OSX, Ubuntu, etc.):

```cs
// If run on a Windows 8.1 system, the example displays output like the following:
// Current OS Information:
//
// Platform: Win32NT
// Version String: Microsoft Windows NT 6.2.9200.0
// Version Information:
// Major: 6
// Minor: 2
// Service Pack: ''
// If run on a Windows 7 system, the example displays output like the following:
// Current OS Information:
//
// Platform: Win32NT
// Version String: Microsoft Windows NT 6.1.7601 Service Pack 1
// Version Information:
// Major: 6
// Minor: 1
// Service Pack: 'Service Pack 1'
```

I don't recall if the code examples are stored in another repo or in dotnet-api-docs, so feel free to transfer the issue to another repo if necessary.

@mairaw

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.