Popular Usenet Groups

Your one stop shop for all your most popular usenet groups in one place


Categories
Sports Science, Electronics & Maths Hobbies & Recreation
Religion TV & Media Computing - Programming
Music Cycling & Motorsports Computing - General
Photography Computing - Linux Computing - Apple Mac
Others Return to Home Page Register for extra features


Search This Site:

Go Back   Popular Usenet Groups > Computing - Progamming > microsoft.public.dotnet.framework.aspnet

microsoft.public.dotnet.framework.aspnet ASP Net Framework Discussion


 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 25th April 2006, 12:25 AM   #1
Web learner
 
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


Web learner is offline   Reply With Quote
 

Bookmarks


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

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


All times are GMT. The time now is 01:01 PM.


Powered by vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.