The Component
You’ll start by creating a simple component with a method that returns the date. This is the minimal amount of code to create a basic component in the .NET framework. As you look at the listings that follow, take notice of which class was inherited, and keep your eyes open for areas in the code that use the Container class; this plays an important role in a component. Also take a closer look at the ComponentModel namespace—this will give you a better idea of the core pieces that make up a component, not just a class (See Listings 14.1 and 14.2).
Listing 14.1. Basic Component (C#)
using System; using System.ComponentModel; using System.Collections; using System.Diagnostics; namespace WebProject1 { /// <summary> /// Summary description ... |
Get Debugging ASP.NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.