.NET

Reply
Valued Mentor
AubelecBE
Posts: 387
Registered: ‎01-27-2010
Message 1 of 2 (107 Views)

Best way for retrieve specific directory

107 Views, 1 Replies
08-01-2012 02:01 PM

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...

 

Distinguished Contributor
eljobe
Posts: 704
Registered: ‎01-24-2003
Message 2 of 2 (104 Views)

Re: Best way for retrieve specific directory

08-01-2012 02:13 PM in reply to: AubelecBE

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#.

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.