TheReckter
asked on
Create a class that implements IOrderedQueryable
Hello, im currently looking for help in creating a class that implements IOrderedQueryable, in my situation the class will have a struct which contains the various fields that I would need to order by, for example:
Class: Person
Struct: Person.Data
Person.Data.Name (string
Person.Data.Age (int)
Help would be greatly appreciated, thank you
Class: Person
Struct: Person.Data
Person.Data.Name (string
Person.Data.Age (int)
Help would be greatly appreciated, thank you
What interface is that?
ASKER
the interface is IOrderedQueryable, I would like to implement it in a class called People. which is a list of the Person objects. Within each person object is a struct called data which has the following public variables:
string Name
int Age
now I want to be able to sort the Person objects within the People class via Name and Age, im not sure whether the IOrderedQueryable interface is the best way to do it
string Name
int Age
now I want to be able to sort the Person objects within the People class via Name and Age, im not sure whether the IOrderedQueryable interface is the best way to do it
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It is found in System.Linq. I believe the System.Linq namespace was created for 3.5 of the .NET framework, so maybe thats why you cant find it. Ok, I will check out that interface, thank you.
and thankyou for the pointer. I will have a peek at that cheers :)
Andrew
Andrew