Sometimes you need to quickly create some temp file on the desktop e.g., for this you need to remember and type full path of your desktop which usually is "c:\users\{username}\desktop" which is a bit HardCoded way, on the one hand you need to type long string by hand(one character mistake and path doesn't work :/), on the other hand you may need your "program" to do the same thing on another computer, which has different user name(so HardCoded method will fail).
There is very simple solution for this, System.Environment class and it's SpecialFolder included folders, which are almost all of Windows default folders: Desktop, My Documents, Temp and etc.
so yo can simply write:
StreamWriter wr = File.CreateText(
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "test.txt"));
which creates test.txt file on every computer's desktop it's launched.