ItemRec.cs
namespace Stores
{ class ItemRec
{ public int index;
public string descr;
public double price;
//Constructor
public ItemRec(int c_index, string c_descr, double c_price)
{ index = c_index:
descr = c_descr;
price = c_price; }
public int my_index { get {return index;} set {index = value;}}
public string my_descr { get {return descrt;} set {descr = value;}}
public double my_price {get {return price;} set {price = value;}}
Program.cs
List<Stores.ItemRec> ItemRecN = new List<Stores.ItemRec>();
Application.Run (new Form1());
Form1.cs
public partial class Form1: Form
{ list<Stores.ItemRec> ItemRecN = new <Stores.ItemRec>();
]
public Form1()
{}
private void FileNew_Click(......................)
{ ItemRecN.Add(new Stores.ItemRec(0,"Stationary", 0.00));
ItemRecN.Add(new Stores.Itemrec(1,"Books ", 0.00));
etc.
}