I have generic list foo as shown below
var foo = new List<XYZ>();
public class XYZ
{
public String TimeZone { get; set; }
public Decimal? B1Volume { get; set; }
public Decimal? B2Volume { get; set; }
public Decimal? B3Volume { get; set; }
public Decimal? B4Volume { get; set; }
public Decimal? B5Volume { get; set; }
// .............
// .............
public Decimal? B24Volume { get; set; }
public String Name {get;set;}
}
how do I select the properties B1Volume,........B24Volume ?
I tried with following code mentioned below, but it's not giving expected results
var hp = foo.Skip(1).Take(23).ToList();
Skip,Take... works on objects not their properties. It works when you have a list like this:{xyz1, xyz2 .... xyz24}