The SPWebApplication objects represents a SharePoint Web Application, which essentially is an IIS virtual server. Using this class we can do some high level operations. Please find some of the actions you can perform.
· Create a web application
· Collect all the features in a particular web application
· Delete a web application
· Some administrative task for the web application.
Below is a small example to delete a web application
SPWebApplication MyWebApplication = SPWebApplication.Lookup(new Uri("URL Web application URL "));
MyWebApplication.Delete
You can also use SpWebApplication to set the maximum file size or per-user alert settings for a web application
MyWebApplication.MaximumFileSize = 50;
MyWebApplication.AlertsMaximum = 500;
MyWebApplication.Update();