What I want is a slick way to do like
{ A, B, C }
---> { {A, B}, {A, C}, {B, C} }
where A
, B
and C
are of type Widget
and { A, B, C }
is of type Widget[]
and { {A, B}, {A, C}, {B, C} }
is of type IEnumerable<Pair<Widget,Widget>>
or IEnumerable<Tuple<Widget,Widget>>
.