passing variables

Discussion in 'ASP .Net' started by David, Jul 25, 2005.

  1. David

    David Guest

    Hi,

    I have this (thanks Clint) which I have modified slightly from Clints code.

    using System;

    namespace NewsGroupHelpASPNET
    {
    /// <summary>
    /// Summary description for MyPage.
    /// </summary>
    public class PageClass
    {
    private Table tables;
    private StringBuilder sb = null;

    public PageClass()
    {
    }

    public void WriteText(string textToWrite)
    {
    sb.Append(textToWrite)
    }

    public Table Tables
    {
    get { return this.tables; }
    set { this.tables = value; }
    }
    }
    public class Table
    {
    private Row[] rows;
    public Table()
    {

    }
    public Row[] Rows
    {
    get { return this.rows; }
    set { this.rows = value; }
    }
    public Add(int Rows, int Cols)
    {
    }
    public Close()
    {
    }
    }
    public class Row
    {
    private Cell[] cells;
    public Row()
    {

    }
    public Cell[] Cells
    {
    get { return this.cells; }
    set { this.cells = value; }
    }
    }
    public class Cell
    {
    private string cellText;
    public Cell()
    {

    }
    public string Text
    {
    get { return this.cellText; }
    set { this.cellText = value; }
    }
    }
    }


    When I do table.Add(2, 2), I need to add some text into the StringBuilder sb
    which is in the top level class PageClass. I will also need to do this
    within the Row and Cell as well as Text.

    On top of this, the 2, 2 in the Add, I will need to store somewhere so that
    Row and Cell can access them.

    Thanks for any help you can offer.

    Best regards,
    Dave Colliver.
    http://www.AshfieldFOCUS.com
    ~~
    http://www.FOCUSPortals.com - Local franchises available
     
    David, Jul 25, 2005
    #1
    1. Advertising

  2. David

    David Guest

    Anybody???

    Best regards,
    Dave Colliver.
    http://www.CoventryFOCUS.com
    ~~
    http://www.FOCUSPortals.com - Local franchises available


    "David" <> wrote in message
    news:...
    > Hi,
    >
    > I have this (thanks Clint) which I have modified slightly from Clints
    > code.
    >
    > using System;
    >
    > namespace NewsGroupHelpASPNET
    > {
    > /// <summary>
    > /// Summary description for MyPage.
    > /// </summary>
    > public class PageClass
    > {
    > private Table tables;
    > private StringBuilder sb = null;
    >
    > public PageClass()
    > {
    > }
    >
    > public void WriteText(string textToWrite)
    > {
    > sb.Append(textToWrite)
    > }
    >
    > public Table Tables
    > {
    > get { return this.tables; }
    > set { this.tables = value; }
    > }
    > }
    > public class Table
    > {
    > private Row[] rows;
    > public Table()
    > {
    >
    > }
    > public Row[] Rows
    > {
    > get { return this.rows; }
    > set { this.rows = value; }
    > }
    > public Add(int Rows, int Cols)
    > {
    > }
    > public Close()
    > {
    > }
    > }
    > public class Row
    > {
    > private Cell[] cells;
    > public Row()
    > {
    >
    > }
    > public Cell[] Cells
    > {
    > get { return this.cells; }
    > set { this.cells = value; }
    > }
    > }
    > public class Cell
    > {
    > private string cellText;
    > public Cell()
    > {
    >
    > }
    > public string Text
    > {
    > get { return this.cellText; }
    > set { this.cellText = value; }
    > }
    > }
    > }
    >
    >
    > When I do table.Add(2, 2), I need to add some text into the StringBuilder
    > sb which is in the top level class PageClass. I will also need to do this
    > within the Row and Cell as well as Text.
    >
    > On top of this, the 2, 2 in the Add, I will need to store somewhere so
    > that Row and Cell can access them.
    >
    > Thanks for any help you can offer.
    >
    > Best regards,
    > Dave Colliver.
    > http://www.AshfieldFOCUS.com
    > ~~
    > http://www.FOCUSPortals.com - Local franchises available
    >
     
    David, Jul 26, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Victor Bazarov
    Replies:
    25
    Views:
    968
    E. Robert Tisdale
    Mar 23, 2005
  2. Replies:
    9
    Views:
    1,015
  3. pereges
    Replies:
    7
    Views:
    464
    pereges
    Jun 1, 2008
  4. Ramon F Herrera
    Replies:
    8
    Views:
    511
    Pascal J. Bourguignon
    Sep 13, 2009
  5. deadpickle
    Replies:
    1
    Views:
    1,096
    Jens Thoms Toerring
    Nov 7, 2010
Loading...

Share This Page