C# C# Basics Strings Combining Strings

Sebastian Manczak
Sebastian Manczak
3,551 Points

basic concatenation1

I am missing something else here..

Program.cs
using System;

class Program
{

    // YOUR CODE HERE: Define an Eat method!
    static string Eat(string foodOne, string foodTwo)
    {
    return = "I think" + foodOne + "and" + foodTwo + "are tasty";
    }
    static void Main(string[] args)
    {
        Console.WriteLine(Eat("apples", "blueberries"));
        Console.WriteLine(Eat("carrots", "daikon"));
    }

}

2 Answers

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 51,809 Points

You are a lot closer. Some more hints:

  • return doesn't require an assignment operator
  • the string should end with an exclamation point
  • the string should also have spaces between words
Sebastian Manczak
Sebastian Manczak
3,551 Points

Thank you, what is an assignment operator?

Neslihan Kara
Neslihan Kara
7,821 Points

it is the equals sign :) it is an operator assigning a value to a variable