diff --git a/xml/System.Globalization/CultureInfo.xml b/xml/System.Globalization/CultureInfo.xml index 5b572fc1719..4571aac8be6 100644 --- a/xml/System.Globalization/CultureInfo.xml +++ b/xml/System.Globalization/CultureInfo.xml @@ -1270,21 +1270,19 @@ You might choose to override some of the values associated with the current cult property lets you define the default UI culture of all threads in an application domain. + In the .NET Framework 4 and previous versions, by default, the UI culture of all threads is set to the Windows system culture. For applications whose current UI culture differs from the default system culture, this behavior is often undesirable. In .NET Framework 4.5+, the property lets you define the default UI culture of all threads in an application domain. > [!IMPORTANT] > If you have not explicitly set the UI culture of any existing threads executing in an application domain, setting the property also changes the culture of these threads. However, if these threads execute in another application domain, their culture is defined by the property in that application domain or, if no default value is defined, by the default system culture. Because of this, we recommend that you always explicitly set the culture of your main application thread and do not rely on the property to define the culture of the main application thread. Unless it is set explicitly, the value of the property is `null`, and the current culture of all threads in an application domain that have not been assigned an explicit culture is defined by the default Windows system culture. - For more information about cultures, threads, and application domains, see the "Culture and threads" and "Culture and application domains" sections in the reference page. - - + For more information about cultures, threads, and application domains, see the "Culture and threads" and "Culture and application domains" sections of . ## Examples - The following example illustrates the default behavior of the .NET Framework in defining the current culture of a new thread. It uses English and Russian language resources. The following text file named GreetingStrings.txt contains the English language resources: + The following example illustrates the default behavior of .NET in defining the current culture of a new thread. It uses English and Russian language resources. The following text file named GreetingStrings.txt contains the English language resources: -``` +```txt greeting =Hello again! newGreeting=Hello! ``` @@ -1297,7 +1295,7 @@ resgen greetingstrings.txt The following text file named GreetingStrings.ru-RU.txt contains the Russian language resources: -``` +```txt greeting=Еще раз привет! newGreeting=Привет! ``` diff --git a/xml/System.IO.MemoryMappedFiles/MemoryMappedFile.xml b/xml/System.IO.MemoryMappedFiles/MemoryMappedFile.xml index cb3dc8b51d1..a357af7b45b 100644 --- a/xml/System.IO.MemoryMappedFiles/MemoryMappedFile.xml +++ b/xml/System.IO.MemoryMappedFiles/MemoryMappedFile.xml @@ -896,38 +896,27 @@ ## Remarks Use this method to create a memory-mapped file that is not persisted (that is, not associated with a file on disk), which you can use to share data between processes. - - ## Examples The following example is composed of three separate processes (console applications) that write `Boolean` values to a memory-mapped file. The following sequence of actions occur: -1. Process A creates the memory-mapped file and writes a value to it. - -2. Process B opens the memory-mapped file and writes a value to it. - -3. Process C opens the memory-mapped file and writes a value to it. - -4. Process A reads and displays the values from the memory-mapped file. - -5. After Process A is finished with the memory-mapped file, the file is immediately reclaimed by garbage collection. +1. Process A creates the memory-mapped file and writes a value to it. +2. Process B opens the memory-mapped file and writes a value to it. +3. Process C opens the memory-mapped file and writes a value to it. +4. Process A reads and displays the values from the memory-mapped file. +5. After Process A is finished with the memory-mapped file, the file is immediately reclaimed by garbage collection. To run this example, do the following: -1. Compile the applications and open three Command windows. - -2. In the first Command window, run Process A. - -3. In the second Command window, run Process B. - -4. Return to Process A and press ENTER. - -5. In the third Command window, run Process C. - -6. Return to Process A and press ENTER. +1. Compile the applications and open three Command windows. +2. In the first Command window, run Process A. +3. In the second Command window, run Process B. +4. Return to Process A and press ENTER. +5. In the third Command window, run Process C. +6. Return to Process A and press ENTER. The output of Process A is as follows: -``` +```txt Start Process B and press ENTER to continue. Start Process C and press ENTER to continue. Process A says: True diff --git a/xml/System.IO/BufferedStream.xml b/xml/System.IO/BufferedStream.xml index c5388fdd3d0..df243abb082 100644 --- a/xml/System.IO/BufferedStream.xml +++ b/xml/System.IO/BufferedStream.xml @@ -743,34 +743,6 @@ Flushing the stream will not flush its underlying encoder unless you explicitly Attempting to manipulate a stream after it has been closed might throw an . -## Examples -This code example is part of a larger example provided for the class. - -```vb -' When bufStream is closed, netStream is in turn -' closed, which in turn shuts down the connection -' and closes clientSocket. -Console.WriteLine(vbCrLf & "Shutting down the connection.") -bufStream.Close() -``` - -```csharp -// When bufStream is closed, netStream is in turn -// closed, which in turn shuts down the connection -// and closes clientSocket. -Console.WriteLine("\nShutting down the connection."); -bufStream.Close(); -``` - -```cpp -// When bufStream is closed, netStream is in turn closed, -// which in turn shuts down the connection and closes -// clientSocket. -Console::WriteLine( "\nShutting down connection." ); -bufStream->Close(); - -``` - ]]> An error occurred while trying to close the stream. diff --git a/xml/System.IO/FileInfo.xml b/xml/System.IO/FileInfo.xml index 812e75e9afe..b451dfe584b 100644 --- a/xml/System.IO/FileInfo.xml +++ b/xml/System.IO/FileInfo.xml @@ -129,7 +129,7 @@ This example produces output similar to the following. -``` +```txt Hello And Welcome diff --git a/xml/System.IO/Path.xml b/xml/System.IO/Path.xml index 8da19dd3f90..1d510fd98f9 100644 --- a/xml/System.IO/Path.xml +++ b/xml/System.IO/Path.xml @@ -2209,7 +2209,7 @@ Console.WriteLine(result); This example produces output similar to the following. -``` +```txt C:\Users\UserName\AppData\Local\Temp\ ```