C# C# Basics Strings Combining Strings

kal alben-mccave
kal alben-mccave
3,217 Points

c# string

Goodnight can someone help with this code challenge and explain step by step how everything is linked, a bit confused.

Program.cs
using System;

class Program
{

    static string Eat(string foodOne, string foodTwo)
    {
        return(foodOne, foodTwo);
    }    

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

}
Matthew Lang
Matthew Lang
13,463 Points

The challenge is asking you to create a string and interpolate the given parameters (foodOne and foodTwo) into it to form a sentence. If you do not know how to do string interpolation watch the video before the code challenge which explains it all in much more depth than I could here.

Good luck!

1 Answer