I require a function/method that retrieves some information, and then use the retrieved information in another function.
Below is the principle of my information retriever function:
public class StuffIneed
{
public ArrayList MyPointList { get; set; }
public string SomeName { get; set; }
public TSG3D.Point SomeOtherPoint { get; set; }
public void DataFetcher()
{
//Bunch of loops to check that we are looking at the correct object
//After the loops I am able to state the value of SomeName and SomeOtherPoint,
//but I am unable to add the value of object.current value to the MyPointList as such:
SomeName = TheObject.Current.Name;
SomeOtherPoint = TheObject.Current.EndPoint;
//above works, but below one doesn't
MyPointList.Add(TheObject.Current.EndPoint);
}
}
I can then use the information in my next function like so:
StuffIneed GatheredInfo = new StuffIneed();
GatheredInfo.StuffIneed();
MessageBox.Show(GatheredInfo.SomeOtherPoint.ToString());
But I am unable to figure out how to add the values into the ArrayList
.