How to return my OrderID from ArrayList

I have this ArrayList called Legs and I assign it to the stopID of my comboBox.Selected Value and then I assign all the data to it like so



((Tracking.BusinessObjects.StopOrderLegDetail)
this._Order.Legs[0]).StopID = (int)this.cboStartingPoint.SelectedValue;

binding to the data....


this.label.Text = ((Tracking.BusinessObjects.StopOrderLegDetail)this._Order.Legs[0]).DetailStop.Name;
this.label.Text = ((Tracking.BusinessObjects.StopOrderLegDetail)this._Order.Legs[0]).DetailStop.Address;


So i know my Legs[0] (arrayList) is full of data....I need to return it by using a loop like this but i dont know what to put in it? here is the loop can someone help me


for(int tempCounter = _StartingVendorLegs.Index -1; tempCounter >= 0; tempCounter--)
{
}


[2343 byte] By [Tryin2Bgood] at [2007-12-26]
# 1

You want to return it to some function calling it?

public ArrayList GetLegs()

{

return this._Oder.Legs;

}

Or through a property?

public ArrayList GetLegs

{

get{

return this._Oder.Legs;

}

}

Or Indexer?

public Type Legs this[int index] //Replace Type to what you need...

{

get{

return (Type) this._Oder.Legs[index]; // Parse before you return...

}

}

Is this what you need?

Best Regards,

RizwanSharp at 2007-9-4 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified