I'm new to C #, looked at numerous posts, but I'm still confused.
I have a list of arrays:
List<Array> moves = new List<Array>();
I add moves to it using the following:
string[] newmove = { piece, axis.ToString(), direction.ToString() }; moves.Add(newmove);
And now I want to remove duplicates using the following:
moves = moves.Distinct();
However, this does not allow me to do this. I get this error:
It is not possible to implicitly convert the type 'System.Collections.Generic.IEnumerable' to 'System.Collections.Generic.List'. Explicit conversion exists (are you skipping listing?)
Help me please? I would be so grateful.
Steve
source share