Skip to content
Prev Previous commit
remove unnecessary whitespace
  • Loading branch information
StuartMosquera committed Oct 21, 2025
commit d92840c132b09f555a0b3321461a1144fd0e4667
16 changes: 8 additions & 8 deletions xml/System.IO/Directory.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1378,17 +1378,17 @@ The returned collection is not cached. Each call to the <xref:System.Collections
The returned collection is not cached. Each call to the <xref:System.Collections.Generic.IEnumerable%601.GetEnumerator%2A> on the collection starts a new enumeration.

## Examples
The following example shows how to retrieve all the text files in a directory and its subdirectories, and move them to a new directory. After the files are moved, they no longer exist in the original directories.
The following example shows how to retrieve all the text files in a directory and its subdirectories and move them to a new directory. After the files are moved, they no longer exist in the original directories.

:::code language="csharp" source="~/snippets/csharp/System.IO/Directory/EnumerateFiles/program4.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System.IO/Directory/EnumerateFiles/program4.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.IO/Directory/EnumerateFiles/program3.vb" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.IO/Directory/EnumerateFiles/program4.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System.IO/Directory/EnumerateFiles/program4.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.IO/Directory/EnumerateFiles/program3.vb" id="Snippet1":::

The following example recursively enumerates all files with the `.txt` extension, ignoring inaccessible directories and files. It reads each line of the file and displays the line if it contains the string "Microsoft".
The following example recursively enumerates all files with the `.txt` extension, ignoring inaccessible directories and files. It reads each line of the file and displays the line if it contains the string "Microsoft".

:::code language="csharp" source="~/snippets/csharp/System.IO/Directory/EnumerateFiles/program3.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System.IO/Directory/EnumerateFiles/program3.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.IO/Directory/EnumerateFiles/program2.vb" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.IO/Directory/EnumerateFiles/program3.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System.IO/Directory/EnumerateFiles/program3.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.IO/Directory/EnumerateFiles/program2.vb" id="Snippet1":::

]]></format>
</remarks>
Expand Down