.NET

.NET

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

Best way for retrieve specific directory

112 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: 706
Registered: ‎01-24-2003
Message 2 of 2 (109 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#.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.