[ad_1]
You can try
lines.GroupBy(ln => ln.Split(new char[]{','}).First())
.Select(grp => grp.First()).ToArray()
Although, I do believe you are covering a bigger problem by allowing a person to be assigned two rooms.
[ad_2]
solved Winforms delete entireline if first value in delimited text is duplicated [closed]