collection
-
A generic collection i.e. cCurves is populated with data. The collection has several fields. I am interested in two of the fields i.e. Name and Name2 As a test, the following return data from the collection. cCurves[0].Name1 cCurves[0].Name2 cCurves[1].Name cCurves[1].Name2 cCurves[2].Name cCurves[2].Name2 ... How can I use a loop to populate a simple array with the data (Name, Name1 fields for each row) in the above collection please? Thanks
-
A generic collection i.e. cCurves is populated with data. The collection has several fields. I am interested in two of the fields i.e. Name and Name2 As a test, the following return data from the collection. cCurves[0].Name1 cCurves[0].Name2 cCurves[1].Name cCurves[1].Name2 cCurves[2].Name cCurves[2].Name2 ... How can I use a loop to populate a simple array with the data (Name, Name1 fields for each row) in the above collection please? Thanks
for(int i=0; i
Upcoming events:
* Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services...Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
-
for(int i=0; i
Upcoming events:
* Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services...Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
-
for(int i=0; i
Upcoming events:
* Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services...Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton
My website
-
A generic collection i.e. cCurves is populated with data. The collection has several fields. I am interested in two of the fields i.e. Name and Name2 As a test, the following return data from the collection. cCurves[0].Name1 cCurves[0].Name2 cCurves[1].Name cCurves[1].Name2 cCurves[2].Name cCurves[2].Name2 ... How can I use a loop to populate a simple array with the data (Name, Name1 fields for each row) in the above collection please? Thanks
You can try using foreach loop over this collection.
-
You can try using foreach loop over this collection.
-
arkiboys wrote:
Can you please simplify the code as it seems to have syntax error.
Ah... That is because I forgot to HTML encode the < symbol
for(int i=0; i<numElements; i++)
{
cCurves[i].Name1 = whatever;
cCurves[i].Name2 = whateverelse;
}
Upcoming events: * Glasgow: Introduction to AJAX (2nd May), SQL Server 2005 - XML and XML Query Plans, Mock Objects, SQL Server Reporting Services... Never write for other people. Write for yourself, because you have a passion for it. -- Marc Clifton My website
-
doing this at present for (int i = 0; i <= cCurve.Count; i++) { } not sure how to declare and populate an array from this collection (cCurve)
Array curve = new Array(cCurve.Count);
Deja View - the feeling that you've seen this post before.