.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Best way for retrieve specific directory

1 REPLY 1
Reply
Message 1 of 2
AubelecBE
350 Views, 1 Reply

Best way for retrieve specific directory

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

 

1 REPLY 1
Message 2 of 2
Ed.Jobe
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#.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost