Valued Mentor
Posts: 373
Registered: ‎01-27-2010
Message 1 of 2 (103 Views)

Best way for retrieve specific directory

103 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
Posts: 704
Registered: ‎01-24-2003
Message 2 of 2 (100 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#.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community