fork download
  1. namespace FromShellExecute
  2. {
  3. class Program
  4. {
  5. static void Main(string[] args)
  6. {
  7. var asm = Assembly.GetEntryAssembly();
  8. if (asm != null)
  9. {
  10. Console.WriteLine("GetEntryAssembly=" + asm.Location);
  11. Console.WriteLine();
  12. }
  13.  
  14. asm = Assembly.GetExecutingAssembly();
  15. if (asm != null)
  16. {
  17. Console.WriteLine("GetExecutingAssembly=" + asm.Location);
  18. Console.WriteLine();
  19. }
  20.  
  21. asm = Assembly.GetCallingAssembly();
  22. if (asm != null)
  23. {
  24. Console.WriteLine("GetCallingAssembly=" + asm.Location);
  25. Console.WriteLine();
  26. }
  27.  
  28. asm = Assembly.GetAssembly(typeof(FromShellExecute.Program));
  29. if (asm != null)
  30. {
  31. Console.WriteLine("GetAssembly(this)=" + asm.Location);
  32. Console.WriteLine();
  33. }
  34.  
  35. Console.WriteLine("Application.ExecutablePath=" + Application.ExecutablePath);
  36. Console.WriteLine();
  37. Console.WriteLine("AppDomain.CurrentDomain.BaseDirectory=" + AppDomain.CurrentDomain.BaseDirectory);
  38. Console.WriteLine();
  39. Console.WriteLine("%1=" + args[0]);
  40. Console.WriteLine();
  41. Console.ReadKey();
  42.  
  43. }
  44. }
  45. }
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty