What is wrong with the below lambda expression for multiplication(C#3.0)
Posted
by Newbie
on Stack Overflow
See other posts from Stack Overflow
or by Newbie
Published on 2010-04-27T07:39:53Z
Indexed on
2010/04/27
7:43 UTC
Read the original article
Hit count: 126
c#3.0
List<double> y = new List<double> { 0.4807, -3.7070, -4.5582, -11.2126, -0.7733, 3.7269, 2.7672, 8.3333, 4.7023 };
List<double> d1 = y.ForEach(i => i * 2);
Error: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
What is wrong?
Thanks
© Stack Overflow or respective owner