Skip to content

Commit 8121c2a

Browse files
Remove CS1502 page and redirect to CS1503 page (#44421)
* Move cs1502 code snippet to cs1503 * Remove CS1502 and redirect to CS1503 * Update .openpublishing.redirection.csharp.json --------- Co-authored-by: Bill Wagner <[email protected]>
1 parent 8f2b9c1 commit 8121c2a

File tree

4 files changed

+31
-51
lines changed

4 files changed

+31
-51
lines changed

.openpublishing.redirection.csharp.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,6 +1826,10 @@
18261826
"source_path_from_root": "/docs/csharp/misc/cs1007.md",
18271827
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/overload-resolution"
18281828
},
1829+
{
1830+
"source_path_from_root": "/docs/csharp/language-reference/compiler-messages/cs1502.md",
1831+
"redirect_url": "/dotnet/csharp/misc/cs1503"
1832+
},
18291833
{
18301834
"source_path_from_root": "/docs/csharp/misc/cs1510.md",
18311835
"redirect_url": "/dotnet/csharp/language-reference/compiler-messages/ref-modifiers-errors"

docs/csharp/language-reference/compiler-messages/cs1502.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

docs/csharp/language-reference/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,7 @@ items:
14711471
- name: CS1113
14721472
href: ../misc/cs1113.md
14731473
- name: CS1502
1474-
href: ./compiler-messages/cs1502.md
1474+
href: ../misc/cs1503.md
14751475
- name: CS1503
14761476
href: ../misc/cs1503.md
14771477
- name: CS1504

docs/csharp/misc/cs1503.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,35 @@ title: "Compiler Error CS1503"
44
ms.date: 07/20/2015
55
f1_keywords:
66
- "CS1503"
7+
- "CS1502"
78
helpviewer_keywords:
89
- "CS1503"
10+
- "CS1502"
911
ms.assetid: 65e4c63d-928d-49f5-8fac-8e113b07e128
1012
---
1113
# Compiler Error CS1503
1214

13-
Argument 'number' cannot convert from TypeA to TypeB
14-
15-
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.
15+
Argument 'argument' cannot convert from TypeA to TypeB
16+
17+
The type of one argument in a method does not match the type that was passed when the class was instantiated.
18+
19+
The following sample generates CS1503:
20+
21+
```csharp
22+
namespace x
23+
{
24+
public class a
25+
{
26+
public a(char i)
27+
// try the following constructor instead
28+
// public a(int i)
29+
{
30+
}
31+
32+
public static void Main()
33+
{
34+
a aa = new a(2222); // CS1503
35+
}
36+
}
37+
}
38+
```

0 commit comments

Comments
 (0)