|
Search This Site: |
|
|||||||
| microsoft.public.dotnet.framework.aspnet ASP Net Framework Discussion |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
#1 |
|
Join Date: Apr 2006
Age: 36
Total Posts: 2
|
from List <double> to double[]
The following code works fine
private List<double> GetDataFor(string column, int selectedYear) { ------- ------- return list; } foreach (double item in GetDataFor("AirTemp", selectedYear)) { Response.Write(item.ToString() + ", "); } It shows data as follows: 37987, -2.42, 37988, -2.41, 37989, -3.34,.................................... where the five digit numbers correspond to date (the first one for 01 Jan 2004) and the decimal negative number as AirTemp. As you can see both are of type double. I have to use this returned "list" of type double as follows: double[] date = (DateTime)item; // ERROR Cannot convert type 'double' to 'System.DateTime' double[] AirTemp = (double)item[1]; // The above gives me error. I am confused what to do. There must be much better and elegant way to do this. the Web_learner |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Section | Replies | Last Post |
| Make Lots of Money Fast!!!!!!!!!!!!!!!!!!!!!!!!! | iengrave | rec.sport.pro-wrestling | 0 | 31st August 2006 09:14 PM |
| Big Brother 7 Contestant List Revealed | Setzer | rec.sport.pro-wrestling | 15 | 9th June 2006 02:45 PM |
| tired of paying for gas, earn money fast and easy | three6mafia116 | alt.autos.toyota | 1 | 11th May 2006 02:21 AM |
| combo box - warning if new data entered (not in list) | Andrew | microsoft.public.access.formscoding | 4 | 25th April 2006 03:09 PM |
| from List <double> to double[] | Web learner | microsoft.public.dotnet.languages.csharp | 0 | 25th April 2006 12:25 AM |