Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# C# Basics Strings Combining Strings

what is the answer for task 1 -1 combining strings plz

what is the answer for task 1 -1 combining strings plz

i really stack here

Program.cs
using System;

class Program
{
 static string Eat()
 {


     }
    static void Main(string[] args)
    {
        Console.WriteLine(Eat("apples", "blueberries"));
        Console.WriteLine(Eat("carrots", "daikon"));
    }

}

1 Answer

Steven Parker
Steven Parker
231,269 Points

Break the task down and see if you can at least get closer. Here's some hints:

  • define two parameters for your method
  • set up a "return" that will pass back a string
  • make the string look like the sample in the instructions
  • use concatenation to join the parameters with the string