//load values to array
string [] dataSetArray = {variable1, variable2, variable3};
//pass array to method Add
oDataStore.Add(dataSetArray);//oDataStore is the object instantiated out of DataStore
//here is my DataStore Namespace
using System.Runtime.Serialization.Formatters.Binary;
using System.Runtime.Serialization;
using IPropertyNamespace //this is where I have all my Get and Set Methods
namespace DataStoreNamespace
{
[Serializable()]
class DataStore
{
public ArrayList propertyList;
public DataStore
{
try
{
IFormatter formatter = new BinatyFormatter();
Stream stream = new FileStrem("Properties.bin", FileMode.Open)
propertyList = (ArrayList)formatter.Deserialize(stream);
strema.Close();
}
catch(Exception)
{
IFormatter formatter = new BinatyFormatter();
Stream stream = new FileStrem("Properties.bin", FileMode.Create);
formatter.Serialize(stream, propertyList)
stream.Close();
}
}
public void Add(string [] newProperty)
{
try
{
propertyList = newproperty;
}
catch(Exception err)
{
MessageBox.Show(err.Message);
}
}
}