Function Basics: Parameter, Arguments, and Returning Values
Learn about the difference between parameters and arguments in functions and explore writing a function that returns a value by creating a tax calculation application in C#.
Most developers will use the terms argument and parameter interchangeably in daily usage. Strictly speaking, the two terms have specific and subtly different meanings. But just like a person can be both a parent and a doctor, the terms often apply to the same thing.
Parameter and arguments
A parameter is a variable in a function definition. For example, startDate
is a parameter of the Hire
function, as shown in the following code:
Get hands-on with 1400+ tech skills courses.