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 Methods Defining a Method

i dont even know what to ask smh??

Program.cs
using System;

class Program
{

    // YOUR CODE HERE: Define a method named Spell. Remember to use the
    // "static" and "void" keywords: "static void Spell" (without quotes)...

    static void spell()
    {
        Spell();
        Console.WriteLine("c");
        Console.WriteLine("a");
        Console.WriteLine("t");

    }

    static void Main(string[] args)
    {
         Spell();
        Console.WriteLine("cat");


}
}

1 Answer

Mark Sebeck
MOD
Mark Sebeck
Treehouse Moderator 38,297 Points

Hi. Ulyssa. You are doing great. Really close. Change your method name to Spell(). Remember method names are case sensitive. Also get rid of the call to Spell() inside the method. You don’t want to call the method from inside it’s own method. Well later you might but that’s a bit advanced.

Mark Sebeck
Mark Sebeck
Treehouse Moderator 38,297 Points

I just noticed that you added a WriteLine”cat” in the main method. Delete that also because the Spell method is taking care of it. Hope this helps!