Rename a file in C# (NET 2.0) without moving it or using DOS / Visual Basic commands
问题 I have not found yet a file-rename-function in .NET for C#, so I'm a bit confused how I would rename a file. I use the command prompt with Process.Start, but this isn't really professional and a black DOS window is popping up each time. Yes, I know there is something in the Visual Basic namespace, but this is not my intention to add the "visual-basic.dll" to my project. I found some examples which "move" the file to rename it. It is a quite painful method and a shoddy workaround for things.