dotnet / dotnet/dotnet-api-docs

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

Aperta
#856 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area-System.Runtime doc-enhancement dotnet-api/prod example-request Pri2
Lingua principale
C#
Stelle
949
Fork
1.7k
Merge medio
2g 19h
PR unite (30g)
52

Descrizione

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**

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia in xml/System/Environment.xml e individua l'esempio della classe Environment contenente i commenti "Keep this information secure". Esamina l'esempio renderizzato e il relativo output, quindi rimuovi o chiarisci i commenti interni di redazione e correggi l'indentazione. Il lavoro è completato quando l'esempio è chiaro per i lettori e la formattazione visualizzata è coerente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.