Visual Studio: Utilize the Server Explorer

Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio


Jump to: navigation, search
Visual Studio
edit

Visual Studio .NET provides a valuable window on the world called the Server Explorer. It can be accessed via the View menu. Developers should realize that many types of items can be opened within VS .NET for editing—e.g., open a table in a database or edit a stored procedure. But, developers should, also, realize that everything is draggable.

Suppose the application requires interaction with a machine application event log. Open the Event Logs tree, and drag the Application icon on top of a Forms designer. In turn, VS .NET will declare a member variable of type System.Diagnostics.EventLog and modify InitializeComponent() accordingly as follows:

this.eventLog1.Log = "Application";
this.eventLog1.MachineName = "OfficeComputer";
this.eventLog1.SynchronizingObject = this;

Identical behavior holds true for all icons. To experiment, drag over an icon representing a Message Queue, stored procedure, or Windows Service.


Personal tools