C# C# Basics Strings Combining Strings

kal alben-mccave
kal alben-mccave
2,714 Points

Is my code correct C# string interpolation

Hey community I would appreciate some help with this code, it's just not compiling

thank you

Program.cs
using System;

class Program
{

    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,822 Points

The brackets go around foodOne and foodTwo since those are what is being replaced.