The Classes Window

The Classes Window

When working with the .NET Framework, information about the multitude of classes that are included in the .NET Framework Class Library is vital. To make it easier, Web Matrix includes features that allow you to access detailed help about any class from within the IDE. The Classes window, by default, shows four folders that contain the ASP.NET Page Intrinsics, the range of Web Controls, the range of HTML Controls, and other common classes for web applications. Below this are the other commonly used classes, listed by namespace. Other views can be selected; for example you can use the icons at the top of the Classes window to display the details in Assembly view (where the classes are listed by the assembly DLL that contains them), or the list can be sorted alphabetically, by class type and by visibility (that is, whether they are public or private). Non-public classes are not shown in the list by default, though the fourth icon in this window can be used to display them in addition to the public classes. The Classes window also contains a search textbox, in which you can enter a search string. Then, only the classes that contain that string in their name will be displayed (press Return to start the search, and then click the View Search Results icon to toggle between the search results and the namespace list): The Customize icon in the top right of the Classes window is used to modify the list of assemblies that appear in the Classes window. The following screenshot shows how to add the System.EnterpriseServices assembly to the list in the Classes window, which then shows all the namespaces within this assembly: The Class Browser Web Matrix includes a comprehensive tool – the Matrix ClassBrowser – that can be opened independently from the Start menu, or from within Web Matrix by double-clicking on a class displayed in the Classes window. When opened from the Start menu, it looks like the following screenshot. The left-hand window lists the .NET Framework namespaces, and for each one the classes and interfaces implemented within that namespace are listed. Doubleclicking on a class opens a list of all the members of that class in a new window in the righthand area of the Class Browser. Clicking on one of the members then displays details of that member in the right-hand area The Class Browser uses reflection to obtain details of the class and its members, so the information is limited to just the member definitions. Each parameter or enumeration listed in the right-hand pane acts as a hyperlink, which when clicked displays information about that object or enumeration in another window. This makes it easy to follow the hierarchy and to get details about the method parameters or property/field value types that are required. There are also links that open the local .NET Framework SDK documentation (if installed) or the online MSDN Library at the relevant page, where more details of the class and its members can be found. The menu bar and toolbar in the Class Browser offer the same set of features as the Classes window we discussed earlier. You can change the sort order and organization of the namespaces and classes in the left-hand window, search for classes by name, and show or hide non-public classes. The same Customize button, which opens the Select Assemblies dialog in which you can add and remove assemblies from the right-hand list, is also present. The Window menu can be used to tile or cascade the windows, or just to switch from one to another. When information about a class is opened from within the Web Matrix IDE (by double-clicking on a class in the Classes window) the same right-hand sections of the page shown in the previous screenshot are displayed within the IDE, but the left-hand list of namespaces is not shown.of this window – including the static fields, constructors, properties, methods, and events.

Formation et coursTélécharger le document complet

Télécharger aussi :

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *