public class Auctions : List<Auction>
{
// Functions here
}
public class Auction
{
public string item_name { get; set; }
public long starting_bid { get; set; }
}
Auctions allAuctions; // With data
string distinctName; // With data
List<Auction> itemSet = allAuctions.Where(auction => auction.item_name.Contains(distinctName)).ToList();
I'm trying to search through derived class
Auctions : List<Auction>
with a LINQ query. In the end, no matter what I try, I get either iterable object or base class (List<Auction>
).
How do I change my code to get result as derived class?