David Smith

David Smith

  • NA
  • 1.9k
  • 0

Array element range select

Jan 22 2012 6:18 PM
If I have an Array of doubles below, using linq how do i select element 2 through 4 to multiply together. I want to do this using linq,


(Array1[0].item2 = 1.0;   *   Array2[0].item2 = 1.0;)  =     1     
(Array1[1].item2 = 2.0;   *   Array2[1].item2 = 2.0;)  =     4
(Array1[2].item2 = 3.0;   *   Array2[2].item2 = 3.0;)  =     9
(Array1[3].item2 = 4.0;   *   Array2[3].item2 = 4.0;)  =     16
(Array1[4].item2 = 5.0;   *   Array2[3].item2 = 5.0;)  =     25


Answers (1)