This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 13th, 2013  |  syntax: None  |  size: 0.77 KB  |  views: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. System.AppDomain.CurrentDomain.BaseDirectory
  2.  
  3. System.IO.Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName)
  4.        
  5. System.Reflection.Assembly.GetExecutingAssembly().Location
  6.        
  7. String exePath = System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName;
  8.  string dir = Path.GetDirectoryName(exePath);
  9.        
  10. string baseDir = System.IO.Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
  11.        
  12. 1. string baseDir =  
  13.     System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
  14.  2. String exePath = System.Environment.GetCommandLineArgs()[0];
  15.  3. string appBaseDir =    System.IO.Path.GetDirectoryName
  16.     (System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
clone this paste RAW Paste Data