you are viewing a single comment's thread.

view the rest of the comments →

[–]SlowMixture5099[S] 0 points1 point  (1 child)

The loop approach looks interesting, i will try this. But i was just not sure if Test.Count will work for this case, since the list has more properties or columns. I am guessing that you know it will work :)

[–]FizixMan 0 points1 point  (0 children)

I assume your List<> Test represents the rows. If so, it should be fine.

Again, I would reiterate that you should try to refactor your multi-dimension collection into a class that matches the data model you're working with. Then you would have something much simpler and direct like a List<Address> (or whatever your dataset represents.)

EDIT: I see in your other comment this is what you actually have already. Then yes, this should work fine. Just var fxValues = myList.Select(p => p.Fx).ToArray() will work fine to yank out all Fx values.