
Redon Kalemaj
1,227 PointsI don't know if you can see my problem, but it gives me error codes on the line that I am trying to return a string.
using System;
class Program
{
static string Eat(string first, string second);
string myString = Console.WriteLine("I think " + first + " and " + second + " are tasty!");
return myString;
static void Main(string[] args)
{
Console.WriteLine(Eat("apples", "blueberries"));
Console.WriteLine(Eat("carrots", "daikon"));
}
}
Shawn McCall
7,863 PointsShawn McCall
7,863 PointsHi Redeon,
It looks like your method doesn't have opening or closing curly braces. In fact, you put a semi-colon instead.
You would need to do something like this:
static string Eat(string first, string second) { // The rest of your code goes here. }