i want to retrieve the Desktop Directory but i found 2 way :
1 : Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory)
2 : My.Computer.FileSystem.SpecialDirectories.Desktop
so.. what is the best ? And why 2 choose for this ? I am confused...
VB provides the My object. It just wraps the environment (as well as other parts of the CLR), which you could access directly if you want. The My object is not available in C#.
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.