Adding Classes to the Sample Application


In this section you will continue the sample application by adding a few classes to the project.

To add classes to the sample application:

  1. On the Solution Explorer window (View > Solution Explorer) right-click on the file entertask.aspx and choose View code.

  2. Inside the namespace classesandmembers, before the class WebForm1, type the code in Figure 2.47 .

    Figure 2.47 ToDoItem and ToDoList are two custom classes in the sample application.
     namespace classesandmembers {  //add the highlighted class   //definitions   class ToDoItem   {   }   class ToDoList   {   }  public class WebForm1 : System.Web.UI.Page    {    //the code continues here 

graphics/tick.gif Tip

  • In the later sections you will add members to the ToDoItem and ToDoList classes.




C#
C# & VB.NET Conversion Pocket Reference
ISBN: 0596003196
EAN: 2147483647
Year: 2003
Pages: 198
Authors: Jose Mojica

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net