[Solved] Winforms delete entireline if first value in delimited text is duplicated [closed]


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.

solved Winforms delete entireline if first value in delimited text is duplicated [closed]