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 (Retired) Prepare and Plan Program Structure

What do we mean by Parameters ()? What do i have put in there? The one in " "?

class Program { static void Main "()" {

}

}

1 Answer

I didn't see anything related to parameters in the quiz connected to this question, so I'm assuming your just asking about parameters in general.

class Program { static void Main () { SayHello("David"); }

void SayHello(string firstName) { System.Console.WriteLine("Hello " + firstName); }

}

The output will display "Hello David". The parameter is the string firstName and is used to pass information around.