Link to home
Start Free TrialLog in
Avatar of coderblues
coderblues

asked on

Lining up data for calculations in C#

I currently get information into 2 datatable that I want to perform calculations on.  This data has dates in the series and I want to be sure that the data is aligned so that the calcs are run on the same numbers of the corresponding dates of the two datatables.  Is there an easier way of doing this rather than iterating through all the rows and doing a check to see if the dates match up?  Would it be easier to do the calcs if the information was held in an array?
Avatar of SameerJagdale
SameerJagdale
Flag of United States of America image

you can take a look at datatable.select() method that helps to filter out data.
http://msdn.microsoft.com/en-us/library/aa325668(VS.71).aspx
 
ASKER CERTIFIED SOLUTION
Avatar of Jon500
Jon500
Flag of Brazil image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of coderblues
coderblues

ASKER

Jon500: Thank you. Can you point me to an example where two datatables are joined into the same dataset object?  I am pulling this information from an external datasource and the two datatables are currently not related.  

In other words if I have two datatables (dt1 & dt2) how can I combine them into the same dataset (ds)?  Still kind of new to C#.  Thanks.
Can you please tell me which version of C# you're using so I don't end up giving you 2.0 code when you might still be using 1.1?
Visual Studio 2008
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial