code_junkie

How does default/relative path resolution work in .NET?

Nov 12th, 2011
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. `System.IO.Directory.SetCurrentDirectory( System.AppDomain.CurrentDomain.BaseDirectory );`
  2.  
  3. Assembly ass = Assembly.GetEntryAssembly();
  4. string dir = ass.Location;
  5. string filename = Path.Combine( dir, "CAISLog.csv" );
  6.  
  7. Assembly ass = Assembly.GetAssembly( typeof( AClassInYourAssembly ) );
Add Comment
Please, Sign In to add comment