How to fix this? Or, why is this error showing up. What am I doing wrong. I understand that there is some issue with the datatype but why and what can I do to resolve this?
My C# code:
int[] nums = new int[5];
int i = 0;
while (i < 5)
{
int num = Convert.ToInt32(Console.ReadLine());
if (Array.Find(nums, num) != 0)
{
Console.WriteLine("Error: Number already inputed. Try a different number.");
continue;
}
i++;
}```
Error:
*Severity Code Description Project File Line Suppression State
Error CS1503 Argument 2: cannot convert from 'int' to 'System.Predicate<int>' udemy lectures beginner section6 exercise D:\C# practice\C# practice codes\exercises\udemy lectures beginner section6 exercise\udemy lectures beginner section6 exercise\Program.cs 104 Active* (line 8)