Get list of unique parents from childrens list Parent has list of Children. I only have access to the list of children. I need to get list of unique parents from the List of Children. Is there a better/faster/more efficient way of doing it than this?

var temp = new HashSet&lt;Parent&gt;(
                        (from child in program.Children
                        select child.Parent).ToList());
Your use of var is good, but names like temp is meaningless. It's a temp what exactly? A more descriptive name is in order here. 

The call to ToList appears to be redundant. Hashset's constructor takes an IEnumerable&lt;T&gt; and Linq queries that return collections already return one.

I would also break the query away from the ctor for readability purposes. 

var parents = from child in program.Children
                 select child.Parent;

var distinctParents = new HashSet&lt;Parent&gt;(allParents);


However, it's all kind of moot if you use the method syntax snippet that @RobH posted. 


var parents = program.Children.Select(c =&gt; c.Parent).Distinct();