I have a list item(myList) on the Zedgraph,
PointPairList myList = new PointPairList();
myList has some values in it, now I want to copy just the y values alone into a new array.
My Trails:
myList.toArray(); // Seems to return a complete set of pointpair list
myList.GetRange(); // Gets a range of pointPair list
I'm looking to find a way, to copy just the y Data.
Thanks in advance....:)
Use
double[] yvalues = myList.Select(p => p.Y).ToArray();
For this you need to include System.Linq
namespace this way
using System.Linq;
您可以使用“ Select
仅获取Y坐标。
var result = myList.Select(pointPair => pointPair.Y).ToArray();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.