Compiler error ยท error CS1503

Argument N: cannot convert from 'X' to 'Y'

The value you handed the method does not fit the parameter's type. It's the argument-position sibling of CS0029 โ€” same idea, different location.

See it happen

void ShowScore(int score)
{
    Console.WriteLine("Score: " + score);
}

ShowScore("ninety");   // the parameter is int โ€” this is text

Read the diagnostic as three facts: which argument (position 1), the type you supplied (string), the type the parameter wants (int). Fixing it means closing that gap on purpose.

Fix 1: convert before passing

void ShowScore(int score)
{
    Console.WriteLine("Score: " + score);
}

ShowScore(int.Parse("90"));   // deliberate conversion: text โ†’ number

Fix 2: let the method accept what you have

Sometimes the signature is the thing that's wrong. If the method only ever prints the value, a string parameter is honest:

void ShowScore(string score)     // accepts what callers actually have
{
    Console.WriteLine("Score: " + score);
}

ShowScore("ninety");

Fix 3: the overload trap

When several overloads exist, the compiler picks by argument types. If none matches exactly, you get CS1503 (or CS1501 for count mismatches):

void Log(int value)    { โ€ฆ }
void Log(string text)  { โ€ฆ }

Log(42);        // โœ“ int overload
Log("done");    // โœ“ string overload
Log(4.2);       // โœ— no Log(double) exists โ€” CS1503

Fix the call (Log((int)4.2) or Log(4.2.ToString())) โ€” or add the missing overload.

Fix 4: number vs number, the lossy case

Passing a double where an int is expected would silently drop the fraction, so C# refuses โ€” that's this same family of error, and the fix is an explicit cast:

void ShowItems(int count)
{
    Console.WriteLine("Items: " + count);
}

double exact = 3.7;
ShowItems((int)exact);   // explicit: "I know, truncate it"

Frequently asked

What does CS1503 mean?

The argument you passed does not match the parameter's type. The message names the position and both types. Pass a value of the right type, convert explicitly, or change the parameter type.

Difference from CS0029?

CS0029 is the assignment version (int x = "5";); CS1503 is the method-argument version. Same fix, different location.

Checklist