I want to check if a position exists in a list containing positions.
private bool PositionExists(List<Vector2> positions, Vector2 position)
{
return positions.Exists(position);
}
This throws me the error
CS1503 C# Argument 1: cannot convert from "Project.Vector2" to "System.Predicate Project.Vector2"
Can I fix this or do I have to use Linq
return positions.Any(currentPos => currentPos == position);