You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Communication Calling Windows Client | NuGet [1.7.0](https://www.nuget.org/packages/Azure.Communication.Calling.WindowsClient/1.7.0)|||
327
+
| Communication Calling Windows Client | NuGet [1.7.0](https://www.nuget.org/packages/Azure.Communication.Calling.WindowsClient/1.7.0)<br>NuGet [1.8.0-beta.1](https://www.nuget.org/packages/Azure.Communication.Calling.WindowsClient/1.8.0-beta.1)|||
Copy file name to clipboardExpand all lines: docs/csharp/language-reference/compiler-messages/params-arrays.md
-22Lines changed: 0 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,6 @@ f1_keywords:
12
12
- "CS1670"
13
13
- "CS1751"
14
14
- "CS9218"
15
-
- "CS9219"
16
-
- "CS9220"
17
-
- "CS9221"
18
-
- "CS9222"
19
15
- "CS9223"
20
16
- "CS9224"
21
17
- "CS9225"
@@ -32,10 +28,6 @@ helpviewer_keywords:
32
28
- "CS1670"
33
29
- "CS1751"
34
30
- "CS9218"
35
-
- "CS9219"
36
-
- "CS9220"
37
-
- "CS9221"
38
-
- "CS9222"
39
31
- "CS9223"
40
32
- "CS9224"
41
33
- "CS9225"
@@ -60,19 +52,12 @@ That's by design. The text closely matches the text of the compiler error / warn
60
52
-[**CS1670**](#method-declaration-rules): *`params` is not valid in this context*
61
53
-[**CS1751**](#method-declaration-rules): *Cannot specify a default value for a parameter array.*
62
54
-[**CS9218**](#parameter-and-argument-type-rules): *The type arguments for method cannot be inferred from the usage because an argument with dynamic type is used and the method has a non-array params collection parameter. Try specifying the type arguments explicitly.*
63
-
-[**CS9219**](#parameter-and-argument-type-rules): *Ambiguity between expanded and normal forms of non-array params collection parameter of, the only corresponding argument has the type `dynamic`. Consider casting the dynamic argument.*
64
55
-[**CS9223**](#other-params-errors): *Creation of params collection results in an infinite chain of invocation of constructor.*
65
56
-[**CS9224**](#other-params-errors): *Method cannot be less visible than the member with params collection.*
66
57
-[**CS9225**](#other-params-errors): *Constructor leaves required member uninitialized.*
67
58
-[**CS9227**](#parameter-and-argument-type-rules): *Type does not contain a definition for a suitable instance `Add` method.*
68
59
-[**CS9228**](#parameter-and-argument-type-rules): *Non-array params collection type must have an applicable constructor that can be called with no arguments.*
69
60
70
-
In addition, the compiler might produce the following *warning* related to the `params` modifier on method parameters:
71
-
72
-
-[**CS9220**](#parameter-and-argument-type-rules): *One or more overloads of method having non-array params collection parameter might be applicable only in expanded form which is not supported during dynamic dispatch.*
73
-
-[**CS9221**](#parameter-and-argument-type-rules): *One or more indexer overloads having non-array params collection parameter might be applicable only in expanded form which is not supported during dynamic dispatch.*
74
-
-[**CS9222**](#parameter-and-argument-type-rules): *One or more constructor overloads having non-array params collection parameter might be applicable only in expanded form which is not supported during dynamic dispatch.*
75
-
76
61
## Method declaration rules
77
62
78
63
The following errors indicate using a `params` modifier on a parameter when the `params` modifier isn't allowed in that context:
@@ -98,17 +83,10 @@ In versions before C# 12, the `params` modifier can't be used on the parameter o
98
83
The following errors indicate that the type of the parameter used with `params` is invalid:
99
84
100
85
-**CS9218**: *The type arguments for method cannot be inferred from the usage because an argument with dynamic type is used and the method has a non-array params collection parameter. Try specifying the type arguments explicitly.*
101
-
-**CS9219**: *Ambiguity between expanded and normal forms of non-array params collection parameter of, the only corresponding argument has the type 'dynamic'. Consider casting the dynamic argument.*
102
86
-**CS0225**: *The params parameter must be a single-dimensional array or have a valid collection type*
103
87
-**CS9227**: *Type does not contain a definition for a suitable instance `Add` method.*
104
88
-**CS9228**: *Non-array params collection type must have an applicable constructor that can be called with no arguments.*
105
89
106
-
The following warnings indicate that the one of the possible overloads might involve dynamic dispatch. The dynamic nature of the argument doesn't participate in overload resolution.
107
-
108
-
-**CS9220**: *One or more overloads of method having non-array params collection parameter might be applicable only in expanded form which is not supported during dynamic dispatch.*
109
-
-**CS9221**: *One or more indexer overloads having non-array params collection parameter might be applicable only in expanded form which is not supported during dynamic dispatch.*
110
-
-**CS9222**: *One or more constructor overloads having non-array params collection parameter might be applicable only in expanded form which is not supported during dynamic dispatch.*
111
-
112
90
In versions before C# 13, the `params` modifier is allowed on single-dimensional arrays only. No other types were valid.
113
91
114
92
Starting with C# 13 any valid collection type can be used. However, some restrictions remain. The collection type must follow the same rules as the target of a [collection expression](../operators/collection-expressions.md#conversions).
0 commit comments