Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .openpublishing.redirection.csharp.json
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,10 @@
"source_path_from_root": "/docs/csharp/misc/cs1007.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overload-resolution"
},
{
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs1502.md",
"redirect_url": "/dotnet/csharp/misc/cs1503.md"
},
{
"source_path_from_root": "/docs/csharp/misc/cs1510.md",
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/ref-modifiers-errors"
Expand Down
47 changes: 0 additions & 47 deletions docs/csharp/language-reference/compiler-messages/cs1502.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/csharp/language-reference/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1471,7 +1471,7 @@ items:
- name: CS1113
href: ../misc/cs1113.md
- name: CS1502
href: ./compiler-messages/cs1502.md
href: ../misc/cs1503.md
- name: CS1503
href: ../misc/cs1503.md
- name: CS1504
Expand Down
29 changes: 26 additions & 3 deletions docs/csharp/misc/cs1503.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,35 @@ title: "Compiler Error CS1503"
ms.date: 07/20/2015
f1_keywords:
- "CS1503"
- "CS1502"
helpviewer_keywords:
- "CS1503"
- "CS1502"
ms.assetid: 65e4c63d-928d-49f5-8fac-8e113b07e128
---
# Compiler Error CS1503

Argument 'number' cannot convert from TypeA to TypeB

The type of one argument in a method does not match the type that was passed when the class was instantiated. This error typically appears along with CS1502. See [CS1502](../language-reference/compiler-messages/cs1502.md) for a discussion of how to resolve this error.
Argument 'argument' cannot convert from TypeA to TypeB

The type of one argument in a method does not match the type that was passed when the class was instantiated.

The following sample generates CS1503:

```csharp
namespace x
{
public class a
{
public a(char i)
// try the following constructor instead
// public a(int i)
{
}

public static void Main()
{
a aa = new a(2222); // CS1503
}
}
}
```
Loading