I am fairly new to c# and I can't figure this out. The error says that I cannot convert string to int implicitly. Here is a snippet of my code. Thanks!
private static int GenerateLetters(int size, bool lowercase) //added a return type
{
{
string randomLetters = string.Empty;
Random r = new Random();
for (int i = 0; i < size; i++)
{
randomLetters += Convert.ToChar(r.Next(65, 90));
}
if (lowercase)
return randomLetters.ToLower();
else
return randomLetters.ToString();
}
}
randomLettersinto string using tostring and returning it... and in heading you have takenintvalue... that's why you are getting this error... Please change either of them..