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) Console I/O Recap

what is a pramiter???

l

1 Answer

SendMessage is a function:

void SendMessage(string message, string recipient)
{

}

When you call this function you give it two pieces of information: a message and a recipient. Something like this:

SendMessage("Hi", "Alex")

The function takes the first piece of information (a value) and puts it in a local variable named message. It then takes the second piece of information and puts it in a local variable named recipient. Since the code block is empty we don't know what it does with those bits of information. We do know that the function does not return a value, as its return type is void.

message and recipient are what are known as the function's parameters. They indicate what information the function needs to do its job. They are also the names of the local variables that are created to hold the passed in values: "Hi" and "Alex".