Valued Mentor
411 Posts
29 Kudos
Registered: ‎01-27-2010
Post 1 of 2

Best way for retrieve specific directory

113 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
716 Posts
4 Kudos
Registered: ‎01-24-2003
Post 2 of 2

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

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!