Earn income with your C# skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest self-service freelancing marketplace for people like you.

What is the difference between parameter and argument in C#?

A parameter is the variable listed inside the parentheses in the function definition.
An argument is the actual value that is sent to the function when it is called.

Below are examples of each.


// a and b are parameters

public int add(int a, int b) 
{
    return a + b;
}

// 2 and 3 are arguments (parameter values)

var sum = add(2, 3); 



Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas.      Vsn 1.3.0