I have a Winforms app written in c#, which needs to save a file on the desktop. I'm using Environment.GetFolderPath(Environment.SpecialFolder.Desktop) to get the path to the Desktop, and it runs fine. I need the app to also run on Linux (using Wine), and I have two issues:
- How to detect from my app if it's running on Windows or Linux?
- How to get the Linux desktop path, if the app is running on Linux?
Thanks
I tried searching for "c# get desktop path on linux", but nothing useful comes up.
Источник: https://stackoverflow.com/questions/780 ... using-wine