passing variables

D

David

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top