Assuming you have a list of objects and a list of ids, you can select the objects with matching ids using LINQ's Where method and the Contains method on the list of ids.
Here is an example:
main.cs565 chars23 linesThis will output:
main.cs24 chars3 lines
gistlibby LogSnag