docfx/apispec/namespace-app.md
The App namespace provides the application entry point and core runtime infrastructure for Terminal.Gui applications.
Terminal.Gui v2 uses an instance-based architecture where Application is a static gateway to IApplication instances:
// Recommended: Instance-based with automatic cleanup
using IApplication app = Application.Create ();
app.Init ();
using Window window = new () { Title = "Hello (Esc to quit)" };
app.Run (window);
// Legacy: Static API (supported, but not recommended)
Application.Init ();
Window window = new () { Title = "Hello (Esc to quit)" };
Application.Run (window);
window.Dispose ();
Application.Shutdown ();