Error CS0161 'Purchase Invoice.Validation Datagridview()': not all code paths return a value code example
Example: Error CS0161 'Purchase Invoice.Validation Datagridview()': not all code paths return a value
public static bool isTwenty(int num)
{
for(int j = 1; j <= 20; j++)
{
if(num % j != 0)
{
return false;
}
else if(num % j == 0 && num == 20)
{
return true;
}
}
return false; //This is your missing statement
}