dotnet / dotnet/dotnet-api-docs

The example seems to contain comments meant for internal (Microsoft) use

Offen
#856 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
area-System.Runtime doc-enhancement dotnet-api/prod example-request Pri2
Vorherrschende Sprache
C#
Sterne
949
Forks
1.7k
Ø Merge
2 T. 19 Std.
Gemergte PRs (30 T.)
52

Beschreibung

In the code example given on the page, there are several comments that say `<-- Keep this information secure! -->`:

```
// <-- Keep this information secure! -->
Console.WriteLine("CurrentDirectory: {0}", Environment.CurrentDirectory);

// <-- Keep this information secure! -->
Console.WriteLine("MachineName: {0}", Environment.MachineName);
```

This is confusing. It started to make sense when I looked at the result of the code sample:

> This example produces results similar to the following:
> (Any result that is lengthy or reveals information that should remain
secure has been omitted and marked "!---OMITTED---!".)
> …
> CurrentDirectory: C:\Documents and Settings\!---OMITTED---!
> ...
> MachineName: !---OMITTED---!

So it looks like those "keep this information secure" comments are meant for the documentation author as a reminder to redact sensitive information. At the moment those comments are confusing, and it may be worth removing them or adding context for the reader.

Also, I noticed that code indentation needs to be corrected as well.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: cb3fdf17-2772-6fbc-e62f-fb92a204d317
* Version Independent ID: 1918599a-dc61-962c-6227-b51684b51649
* Content: [Environment Class (System)](https://docs.microsoft.com/en-us/dotnet/api/system.environment?view=netframework-4.7.2)
* Content Source: [xml/System/Environment.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System/Environment.xml)
* Product: **dotnet-api**
* GitHub Login: @rpetrusha
* Microsoft Alias: **ronpet**

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginnen Sie in xml/System/Environment.xml und suchen Sie das Beispiel der Environment-Klasse mit den Kommentaren „Keep this information secure“. Überprüfen Sie das gerenderte Beispiel und seine Ausgabe. Entfernen oder präzisieren Sie anschließend die internen Redaktionskommentare und korrigieren Sie die Einrückung. Die Aufgabe ist abgeschlossen, wenn das Beispiel für Leser klar ist und seine angezeigte Formatierung konsistent ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
csharp
Bereich
documentation
Issue-Typ
Dokumentation
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.