TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Smith
NA
2k
0
Linq Array filter or range
Jan 30 2012 9:26 AM
Vuples where are you lololol?
using linq i want multilpty to multiply (Aarray1 * Array2) from 2.3 to 2.05 then i want to sum the output array base upon the range , can some help me
Array1[0] = {( 2.00, 1.00 )} * Array2[0] = {( 2.00, 2.00 )} = 2
Array1[1] = {( 2.01, 2.00 )} * Array2[1] = {( 2.01, 3.00 )} = 6
Array1[2] = {( 2.02, 3.00 )} * Array2[2] = {( 2.02, 4.00 )} = 12
Array1[3] = {( 2.03, 4.00 )} * Array2[3] = {( 2.03, 5.00 )} = 20
Array1[4] = {( 2.04, 5.00 )} * Array2[4] = {( 2.04, 6.00 )} = 30
Array1[5] = {( 2.05, 6.00 )} * Array2[5] = {( 2.05, 7.00 )} = 42
Array1[6] = {( 2.06, 7.00 )} * Array2[6] = {( 2.06, 8.00 )} = 56
-----------------------------------------------------------------------
Output[0] = {( 2.03, 20)}
Output[1] = {( 2.04, 30 )}
Output[2] = {( 2.05, 42 )}
double result = Output.Sum();
result = 92
Reply
Answers (
13
)
How to search in gridview values using textbox in visual studio 2010
File Open / Download