471,079 Members | 993 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,079 software developers and data experts.

difference between: Path.GetDirectoryName and Directory.GetCurrentDirectory

Hi Guys,

anyone could help me understand the difference between these two methods?

Expand|Select|Wrap|Line Numbers
  1. path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase.Replace("file:/", ""));
Expand|Select|Wrap|Line Numbers
  1. path_Startup = System.IO.Directory.GetCurrentDirectory();
I am getting the same result.

I read something about shadow copies and Path.GetDirectoryName being more reliable because of that, but I couldn't find anything too clear.

Anyhelp would be appreciated.

Thanks,
Jan 27 '08 #1
0 1197

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

11 posts views Thread by kk | last post: by
4 posts views Thread by Tim | last post: by
8 posts views Thread by PvtPile | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.