Skip to content

Commit c6233f8

Browse files
authored
Change devlanguage (#44234)
respond to internal feedback. The code is VB, but it's labelled as C#.
1 parent 971f563 commit c6233f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/visual-basic/developing-apps/programming/drives-directories-files/how-to-rename-a-file.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "How to: Rename a File"
33
description: "Learn about how to rename a file with the Visual Basic Runtime Library or the .NET base class library."
4-
ms.date: 07/20/2015
4+
ms.date: 01/14/2025
55
helpviewer_keywords:
66
- "I/O [Visual Basic], renaming files"
77
- "files [Visual Basic], renaming"
@@ -17,15 +17,15 @@ The `System.IO.File` object doesn't contain a method to rename a file, instead,
1717

1818
The following example renames the file located in the `My Documents` folder from `TextFile.txt` to `NewName.txt`.
1919

20-
:::code language="csharp" source="./snippets/how-to-rename-a-file/Form1.vb" id="BCLRename":::
20+
:::code language="vb" source="./snippets/how-to-rename-a-file/Form1.vb" id="BCLRename":::
2121

2222
## Rename with the Visual Basic run-time
2323

2424
Use the `RenameFile` method of the `My.Computer.FileSystem` object to rename a file by supplying the full path to the file and the new file name. This method can't be used to move a file to a different directory. To learn how to move a file, see [How to: Move a File in Visual Basic](how-to-move-a-file.md).
2525

2626
The following example renames the file located in the `My Documents` folder from `TextFile.txt` to `NewName.txt`.
2727

28-
:::code language="csharp" source="./snippets/how-to-rename-a-file/Form1.vb" id="MyRename":::
28+
:::code language="vb" source="./snippets/how-to-rename-a-file/Form1.vb" id="MyRename":::
2929

3030
Visual Studio provides an IntelliSense code snippet that uses `My.Computer.FileSystem.RenameFile`. The snippet is located in **File system - Processing Drives, Folders, and Files**. For more information, see [Code Snippets](/visualstudio/ide/code-snippets).
3131

0 commit comments

Comments
 (0)