fork download
  1. using System;
  2.  
  3. namespace Recetas.Cap03
  4. {
  5. internal class DescargarAppDomainAnfitrion
  6. {
  7. public static void Main()
  8. {
  9. AppDomain appDomainAnfitrion = AppDomain.CurrentDomain;
  10.  
  11. // Genera la excepción `System.CannotUnloadAppDomainException`:
  12. AppDomain.Unload(appDomainAnfitrion);
  13. }
  14. }
  15. }
Runtime error #stdin #stdout #stderr 0.02s 36360KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Unhandled Exception: System.CannotUnloadAppDomainException: The default appdomain can not be unloaded.
  at (wrapper managed-to-native) System.AppDomain:InternalUnload (int)
  at System.AppDomain.Unload (System.AppDomain domain) [0x00000] in <filename unknown>:0 
  at Recetas.Cap03.DescargarAppDomainAnfitrion.Main () [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.CannotUnloadAppDomainException: The default appdomain can not be unloaded.
  at (wrapper managed-to-native) System.AppDomain:InternalUnload (int)
  at System.AppDomain.Unload (System.AppDomain domain) [0x00000] in <filename unknown>:0 
  at Recetas.Cap03.DescargarAppDomainAnfitrion.Main () [0x00000] in <filename unknown>:0