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

fix

Program.cs
using System;

class Program
{

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

    public static void Spell(string[] args)
    {
        Spell();
    }
}

1 Answer

Steven Parker
Steven Parker
231,198 Points

Here's a few hints:

  • don't change the "Main" method
  • you won't need a semicolon after the declaration of "Spell"
  • BUT, after you declare "Spell", give it a body block enclosed in braces
  • the instructions give you the code for the body — just copy and paste that part in