In this post, you’ll learn all the C# compiler error and warnings from the code CS1501 to CS2000.
C# Compiler Error Codes CS1501 to CS2000
Error Code | Type | Error/Warning Description |
---|---|---|
CS1501 | Error | No overload for method ‘{0}’ takes {1} arguments |
CS1503 | Error | Argument {0}: cannot convert from ‘{1}’ to ‘{2}’ |
CS1504 | Error | Source file ‘{0}’ could not be opened — {1} |
CS1507 | Error | Cannot link resource files when building a module |
CS1508 | Error | Resource identifier ‘{0}’ has already been used in this assembly |
CS1509 | Error | The referenced file ‘{0}’ is not an assembly |
CS1510 | Error | A ref or out value must be an assignable variable |
CS1511 | Error | Keyword ‘base’ is not available in a static method |
CS1512 | Error | Keyword ‘base’ is not available in the current context |
CS1513 | Error | } expected |
CS1514 | Error | { expected |
CS1515 | Error | ‘in’ expected |
CS1517 | Error | Invalid preprocessor expression |
CS1519 | Error | Invalid token ‘{0}’ in class, record, struct, or interface member declaration |
CS1520 | Error | Method must have a return type |
CS1521 | Error | Invalid base type |
CS1522 | Warning | Empty switch block |
CS1524 | Error | Expected catch or finally |
CS1525 | Error | Invalid expression term ‘{0}’ |
CS1526 | Error | A new expression requires an argument list or (), [], or {} after type |
CS1527 | Error | Elements defined in a namespace cannot be explicitly declared as private, protected, protected internal, or private protected |
CS1528 | Error | Expected ; or = (cannot specify constructor arguments in declaration) |
CS1529 | Error | A using clause must precede all other elements defined in the namespace except extern alias declarations |
CS1534 | Error | Overloaded binary operator ‘{0}’ takes two parameters |
CS1535 | Error | Overloaded unary operator ‘{0}’ takes one parameter |
CS1536 | Error | Invalid parameter type ‘void’ |
CS1537 | Error | The using alias ‘{0}’ appeared previously in this namespace |
CS1540 | Error | Cannot access protected member ‘{0}’ via a qualifier of type ‘{1}’; the qualifier must be of type ‘{2}’ (or derived from it) |
CS1542 | Error | ‘{0}’ cannot be added to this assembly because it already is an assembly |
CS1545 | Error | Property, indexer, or event ‘{0}’ is not supported by the language; try directly calling accessor methods ‘{1}’ or ‘{2}’ |
CS1546 | Error | Property, indexer, or event ‘{0}’ is not supported by the language; try directly calling accessor method ‘{1}’ |
CS1547 | Error | Keyword ‘void’ cannot be used in this context |
CS1551 | Error | Indexers must have at least one parameter |
CS1552 | Error | Array type specifier, [], must appear before parameter name |
CS1553 | Error | Declaration is not valid; use ‘{0} operator \<dest-type\> (…’ instead |
CS1555 | Error | Could not find ‘{0}’ specified for Main method |
CS1556 | Error | ‘{0}’ specified for Main method must be a non-generic class, record, struct, or interface |
CS1558 | Error | ‘{0}’ does not have a suitable static ‘Main’ method |
CS1562 | Error | Outputs without source must have the /out option specified |
CS1564 | Error | Conflicting options specified: Win32 resource file; Win32 manifest |
CS1565 | Error | Conflicting options specified: Win32 resource file; Win32 icon |
CS1566 | Error | Error reading resource ‘{0}’ — ‘{1}’ |
CS1569 | Error | Error writing to XML documentation file: {0} |
CS1570 | Warning | XML comment has badly formed XML — ‘{0}’ |
CS1571 | Warning | XML comment has a duplicate param tag for ‘{0}’ |
CS1572 | Warning | XML comment has a param tag for ‘{0}’, but there is no parameter by that name |
CS1573 | Warning | Parameter ‘{0}’ has no matching param tag in the XML comment for ‘{1}’ (but other parameters do) |
CS1574 | Warning | XML comment has cref attribute ‘{0}’ that could not be resolved |
CS1575 | Error | A stackalloc expression requires [] after type |
CS1576 | Error | The line number specified for #line directive is missing or invalid |
CS1578 | Error | Quoted file name, single-line comment or end-of-line expected |
CS1579 | Error | foreach statement cannot operate on variables of type ‘{0}’ because ‘{0}’ does not contain a public instance or extension definition for ‘{1}’ |
CS1580 | Warning | Invalid type for parameter {0} in XML comment cref attribute: ‘{1}’ |
CS1581 | Warning | Invalid return type in XML comment cref attribute |
CS1583 | Error | Error reading Win32 resources — {0} |
CS1584 | Warning | XML comment has syntactically incorrect cref attribute ‘{0}’ |
CS1585 | Error | Member modifier ‘{0}’ must precede the member type and name |
CS1586 | Error | Array creation must have array size or array initializer |
CS1587 | Warning | XML comment is not placed on a valid language element |
CS1589 | Warning | Unable to include XML fragment ‘{1}’ of file ‘{0}’ — {2} |
CS1590 | Warning | Invalid XML include element — {0} |
CS1591 | Warning | Missing XML comment for publicly visible type or member ‘{0}’ |
CS1592 | Warning | Badly formed XML in included comments file — ‘{0}’ |
CS1593 | Error | Delegate ‘{0}’ does not take {1} arguments |
CS1597 | Error | Semicolon after method or accessor block is not valid |
CS1599 | Error | The return type of a method, delegate, or function pointer cannot be ‘{0}’ |
CS1600 | Error | Compilation cancelled by user |
CS1601 | Error | Cannot make reference to variable of type ‘{0}’ |
CS1604 | Error | Cannot assign to ‘{0}’ because it is read-only |
CS1605 | Error | Cannot use ‘{0}’ as a ref or out value because it is read-only |
CS1607 | Warning | |
CS1608 | Error | The RequiredAttribute attribute is not permitted on C# types |
CS1609 | Error | Modifiers cannot be placed on event accessor declarations |
CS1611 | Error | The params parameter cannot be declared as {0} |
CS1612 | Error | Cannot modify the return value of ‘{0}’ because it is not a variable |
CS1613 | Error | The managed coclass wrapper class ‘{0}’ for interface ‘{1}’ cannot be found (are you missing an assembly reference?) |
CS1614 | Error | ‘{0}’ is ambiguous between ‘{1}’ and ‘{2}’. Either use ‘@{0}’ or explicitly include the ‘Attribute’ suffix. |
CS1615 | Error | Argument {0} may not be passed with the ‘{1}’ keyword |
CS1616 | Warning | Option ‘{0}’ overrides attribute ‘{1}’ given in a source file or added module |
CS1617 | Error | Invalid option ‘{0}’ for /langversion. Use ‘/langversion:?’ to list supported values. |
CS1618 | Error | Cannot create delegate with ‘{0}’ because it or a method it overrides has a Conditional attribute |
CS1619 | Error | Cannot create temporary file — {0} |
CS1620 | Error | Argument {0} must be passed with the ‘{1}’ keyword |
CS1621 | Error | The yield statement cannot be used inside an anonymous method or lambda expression |
CS1622 | Error | Cannot return a value from an iterator. Use the yield return statement to return a value, or yield break to end the iteration. |
CS1623 | Error | Iterators cannot have ref, in or out parameters |
CS1624 | Error | The body of ‘{0}’ cannot be an iterator block because ‘{1}’ is not an iterator interface type |
CS1625 | Error | Cannot yield in the body of a finally clause |
CS1626 | Error | Cannot yield a value in the body of a try block with a catch clause |
CS1627 | Error | Expression expected after yield return |
CS1628 | Error | Cannot use ref, out, or in parameter ‘{0}’ inside an anonymous method, lambda expression, query expression, or local function |
CS1629 | Error | Unsafe code may not appear in iterators |
CS1631 | Error | Cannot yield a value in the body of a catch clause |
CS1632 | Error | Control cannot leave the body of an anonymous method or lambda expression |
CS1633 | Warning | Unrecognized #pragma directive |
CS1634 | Warning | Expected ‘disable’ or ‘restore’ |
CS1635 | Warning | Cannot restore warning ‘CS{0}’ because it was disabled globally |
CS1636 | Error | __arglist is not allowed in the parameter list of iterators |
CS1637 | Error | Iterators cannot have unsafe parameters or yield types |
CS1639 | Error | The managed coclass wrapper class signature ‘{0}’ for interface ‘{1}’ is not a valid class name signature |
CS1640 | Error | foreach statement cannot operate on variables of type ‘{0}’ because it implements multiple instantiations of ‘{1}’; try casting to a specific interface instantiation |
CS1641 | Error | A fixed size buffer field must have the array size specifier after the field name |
CS1642 | Error | Fixed size buffer fields may only be members of structs |
CS1643 | Error | Not all code paths return a value in {0} of type ‘{1}’ |
CS1645 | Warning | Feature ‘{0}’ is not part of the standardized ISO C# language specification, and may not be accepted by other compilers |
CS1646 | Error | Keyword, identifier, or string expected after verbatim specifier: @ |
CS1648 | Error | Members of readonly field ‘{0}’ cannot be modified (except in a constructor or a variable initializer) |
CS1649 | Error | Members of readonly field ‘{0}’ cannot be used as a ref or out value (except in a constructor) |
CS1650 | Error | Fields of static readonly field ‘{0}’ cannot be assigned to (except in a static constructor or a variable initializer) |
CS1651 | Error | Fields of static readonly field ‘{0}’ cannot be used as a ref or out value (except in a static constructor) |
CS1654 | Error | Cannot modify members of ‘{0}’ because it is a ‘{1}’ |
CS1655 | Error | Cannot use fields of ‘{0}’ as a ref or out value because it is a ‘{1}’ |
CS1656 | Error | Cannot assign to ‘{0}’ because it is a ‘{1}’ |
CS1657 | Error | Cannot use ‘{0}’ as a ref or out value because it is a ‘{1}’ |
CS1658 | Warning | {0}. See also error CS{1}. |
CS1660 | Error | Cannot convert {0} to type ‘{1}’ because it is not a delegate type |
CS1661 | Error | Cannot convert {0} to type ‘{1}’ because the parameter types do not match the delegate parameter types |
CS1662 | Error | Cannot convert {0} to intended delegate type because some of the return types in the block are not implicitly convertible to the delegate return type |
CS1663 | Error | Fixed size buffer type must be one of the following: bool, byte, short, int, long, char, sbyte, ushort, uint, ulong, float or double |
CS1664 | Error | Fixed size buffer of length {0} and type ‘{1}’ is too big |
CS1665 | Error | Fixed size buffers must have a length greater than zero |
CS1666 | Error | You cannot use fixed size buffers contained in unfixed expressions. Try using the fixed statement. |
CS1667 | Error | Attribute ‘{0}’ is not valid on property or event accessors. It is only valid on ‘{1}’ declarations. |
CS1668 | Warning | Invalid search path ‘{0}’ specified in ‘{1}’ — ‘{2}’ |
CS1669 | Error | __arglist is not valid in this context |
CS1670 | Error | params is not valid in this context |
CS1671 | Error | A namespace declaration cannot have modifiers or attributes |
CS1672 | Error | Invalid option ‘{0}’ for /platform; must be anycpu, x86, Itanium, arm, arm64 or x64 |
CS1673 | Error | Anonymous methods, lambda expressions, query expressions, and local functions inside structs cannot access instance members of ‘this’. Consider copying ‘this’ to a local variable outside the anonymous method, lambda expression, query expression, or local function and using the local instead. |
CS1674 | Error | ‘{0}’: type used in a using statement must be implicitly convertible to ‘System.IDisposable’. |
CS1676 | Error | Parameter {0} must be declared with the ‘{1}’ keyword |
CS1677 | Error | Parameter {0} should not be declared with the ‘{1}’ keyword |
CS1678 | Error | Parameter {0} is declared as type ‘{1}{2}’ but should be ‘{3}{4}’ |
CS1679 | Error | Invalid extern alias for ‘/reference’; ‘{0}’ is not a valid identifier |
CS1680 | Error | Invalid reference alias option: ‘{0}=’ — missing filename |
CS1681 | Error | You cannot redefine the global extern alias |
CS1685 | Warning | The predefined type ‘{0}’ is defined in multiple assemblies in the global alias; using definition from ‘{1}’ |
CS1686 | Error | Local ‘{0}’ or its members cannot have their address taken and be used inside an anonymous method or lambda expression |
CS1687 | Warning | Source file has exceeded the limit of 16,707,565 lines representable in the PDB; debug information will be incorrect |
CS1688 | Error | Cannot convert anonymous method block without a parameter list to delegate type ‘{0}’ because it has one or more out parameters |
CS1689 | Error | Attribute ‘{0}’ is only valid on methods or attribute classes |
CS1690 | Warning | Accessing a member on ‘{0}’ may cause a runtime exception because it is a field of a marshal-by-reference class |
CS1692 | Warning | Invalid number |
CS1695 | Warning | Invalid #pragma checksum syntax; should be #pragma checksum “filename” “{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}” “XXXX…” |
CS1696 | Warning | Single-line comment or end-of-line expected |
CS1697 | Warning | Different checksum values given for ‘{0}’ |
CS1700 | Warning | Assembly reference ‘{0}’ is invalid and cannot be resolved |
CS1701 | Warning | Assuming assembly reference ‘{0}’ used by ‘{1}’ matches identity ‘{2}’ of ‘{3}’, you may need to supply runtime policy |
CS1702 | Warning | Assuming assembly reference ‘{0}’ used by ‘{1}’ matches identity ‘{2}’ of ‘{3}’, you may need to supply runtime policy |
CS1703 | Error | Multiple assemblies with equivalent identity have been imported: ‘{0}’ and ‘{1}’. Remove one of the duplicate references. |
CS1704 | Error | An assembly with the same simple name ‘{0}’ has already been imported. Try removing one of the references (e.g. ‘{1}’) or sign them to enable side-by-side. |
CS1705 | Error | Assembly ‘{0}’ with identity ‘{1}’ uses ‘{2}’ which has a higher version than referenced assembly ‘{3}’ with identity ‘{4}’ |
CS1708 | Error | Fixed size buffers can only be accessed through locals or fields |
CS1710 | Warning | XML comment has a duplicate typeparam tag for ‘{0}’ |
CS1711 | Warning | XML comment has a typeparam tag for ‘{0}’, but there is no type parameter by that name |
CS1712 | Warning | Type parameter ‘{0}’ has no matching typeparam tag in the XML comment on ‘{1}’ (but other type parameters do) |
CS1715 | Error | ‘{0}’: type must be ‘{2}’ to match overridden member ‘{1}’ |
CS1716 | Error | Do not use ‘System.Runtime.CompilerServices.FixedBuffer’ attribute. Use the ‘fixed’ field modifier instead. |
CS1717 | Warning | Assignment made to same variable; did you mean to assign something else? |
CS1718 | Warning | Comparison made to same variable; did you mean to compare something else? |
CS1719 | Error | Error opening Win32 resource file ‘{0}’ — ‘{1}’ |
CS1720 | Warning | Expression will always cause a System.NullReferenceException because the default value of ‘{0}’ is null |
CS1721 | Error | Class ‘{0}’ cannot have multiple base classes: ‘{1}’ and ‘{2}’ |
CS1722 | Error | Base class ‘{0}’ must come before any interfaces |
CS1723 | Warning | XML comment has cref attribute ‘{0}’ that refers to a type parameter |
CS1725 | Error | Friend assembly reference ‘{0}’ is invalid. InternalsVisibleTo declarations cannot have a version, culture, public key token, or processor architecture specified. |
CS1726 | Error | Friend assembly reference ‘{0}’ is invalid. Strong-name signed assemblies must specify a public key in their InternalsVisibleTo declarations. |
CS1728 | Error | Cannot bind delegate to ‘{0}’ because it is a member of ‘System.Nullable\<T\>‘ |
CS1729 | Error | ‘{0}’ does not contain a constructor that takes {1} arguments |
CS1730 | Error | Assembly and module attributes must precede all other elements defined in a file except using clauses and extern alias declarations |
CS1733 | Error | Expected expression |
CS1734 | Warning | XML comment on ‘{1}’ has a paramref tag for ‘{0}’, but there is no parameter by that name |
CS1735 | Warning | XML comment on ‘{1}’ has a typeparamref tag for ‘{0}’, but there is no type parameter by that name |
CS1736 | Error | Default parameter value for ‘{0}’ must be a compile-time constant |
CS1737 | Error | Optional parameters must appear after all required parameters |
CS1738 | Error | Named argument specifications must appear after all fixed arguments have been specified. Please use language version {0} or greater to allow non-trailing named arguments. |
CS1739 | Error | The best overload for ‘{0}’ does not have a parameter named ‘{1}’ |
CS1740 | Error | Named argument ‘{0}’ cannot be specified multiple times |
CS1741 | Error | A ref or out parameter cannot have a default value |
CS1742 | Error | An array access may not have a named argument specifier |
CS1743 | Error | Cannot specify a default value for the ‘this’ parameter |
CS1744 | Error | Named argument ‘{0}’ specifies a parameter for which a positional argument has already been given |
CS1745 | Error | Cannot specify default parameter value in conjunction with DefaultParameterAttribute or OptionalAttribute |
CS1746 | Error | The delegate ‘{0}’ does not have a parameter named ‘{1}’ |
CS1747 | Error | Cannot embed interop types from assembly ‘{0}’ because it is missing the ‘{1}’ attribute. |
CS1748 | Error | Cannot find the interop type that matches the embedded interop type ‘{0}’. Are you missing an assembly reference? |
CS1750 | Error | A value of type ‘{0}’ cannot be used as a default parameter because there are no standard conversions to type ‘{1}’ |
CS1751 | Error | Cannot specify a default value for a parameter array |
CS1752 | Error | Interop type ‘{0}’ cannot be embedded. Use the applicable interface instead. |
CS1754 | Error | Type ‘{0}’ cannot be embedded because it is a nested type. Consider setting the ‘Embed Interop Types’ property to false. |
CS1756 | Error | Interop type ‘{0}’ cannot be embedded because it is missing the required ‘{1}’ attribute. |
CS1757 | Error | Embedded interop struct ‘{0}’ can contain only public instance fields. |
CS1758 | Error | Cannot embed interop type ‘{0}’ found in both assembly ‘{1}’ and ‘{2}’. Consider setting the ‘Embed Interop Types’ property to false. |
CS1759 | Error | Cannot embed interop types from assembly ‘{0}’ because it is missing either the ‘{1}’ attribute or the ‘{2}’ attribute. |
CS1760 | Error | Assemblies ‘{0}’ and ‘{1}’ refer to the same metadata but only one is a linked reference (specified using /link option); consider removing one of the references. |
CS1761 | Error | Embedding the interop type ‘{0}’ from assembly ‘{1}’ causes a name clash in the current assembly. Consider setting the ‘Embed Interop Types’ property to false. |
CS1762 | Warning | A reference was created to embedded interop assembly ‘{0}’ because of an indirect reference to that assembly created by assembly ‘{1}’. Consider changing the ‘Embed Interop Types’ property on either assembly. |
CS1763 | Error | ‘{0}’ is of type ‘{1}’. A default parameter value of a reference type other than string can only be initialized with null |
CS1764 | Error | Cannot use fixed local ‘{0}’ inside an anonymous method, lambda expression, or query expression |
CS1766 | Error | Source interface ‘{0}’ is missing method ‘{1}’ which is required to embed event ‘{2}’. |
CS1767 | Error | Interface ‘{0}’ has an invalid source interface which is required to embed event ‘{1}’. |
CS1768 | Error | Type ‘{0}’ cannot be embedded because it has a generic argument. Consider setting the ‘Embed Interop Types’ property to false. |
CS1769 | Error | Type ‘{0}’ from assembly ‘{1}’ cannot be used across assembly boundaries because it has a generic type argument that is an embedded interop type. |
CS1770 | Error | A value of type ‘{0}’ cannot be used as default parameter for nullable parameter ‘{1}’ because ‘{0}’ is not a simple type |
CS1773 | Error | Invalid version {0} for /subsystemversion. The version must be 6.02 or greater for ARM or AppContainerExe, and 4.00 or greater otherwise |
CS1774 | Error | Embedded interop method ‘{0}’ contains a body. |
CS1900 | Error | Warning level must be zero or greater |
CS1902 | Error | Invalid option ‘{0}’ for /debug; must be ‘portable’, ‘embedded’, ‘full’ or ‘pdbonly’ |
CS1906 | Error | Invalid option ‘{0}’; Resource visibility must be either ‘public’ or ‘private’ |
CS1908 | Error | The type of the argument to the DefaultParameterValue attribute must match the parameter type |
CS1910 | Error | Argument of type ‘{0}’ is not applicable for the DefaultParameterValue attribute |
CS1912 | Error | Duplicate initialization of member ‘{0}’ |
CS1913 | Error | Member ‘{0}’ cannot be initialized. It is not a field or property. |
CS1914 | Error | Static field or property ‘{0}’ cannot be assigned in an object initializer |
CS1917 | Error | Members of readonly field ‘{0}’ of type ‘{1}’ cannot be assigned with an object initializer because it is of a value type |
CS1918 | Error | Members of property ‘{0}’ of type ‘{1}’ cannot be assigned with an object initializer because it is of a value type |
CS1919 | Error | Unsafe type ‘{0}’ cannot be used in object creation |
CS1920 | Error | Element initializer cannot be empty |
CS1921 | Error | The best overloaded method match for ‘{0}’ has wrong signature for the initializer element. The initializable Add must be an accessible instance method. |
CS1922 | Error | Cannot initialize type ‘{0}’ with a collection initializer because it does not implement ‘System.Collections.IEnumerable’ |
CS1926 | Error | Error opening Win32 manifest file {0} — {1} |
CS1927 | Warning | Ignoring /win32manifest for module because it only applies to assemblies |
CS1929 | Error | ‘{0}’ does not contain a definition for ‘{1}’ and the best extension method overload ‘{2}’ requires a receiver of type ‘{3}’ |
CS1930 | Error | The range variable ‘{0}’ has already been declared |
CS1931 | Error | The range variable ‘{0}’ conflicts with a previous declaration of ‘{0}’ |
CS1932 | Error | Cannot assign {0} to a range variable |
CS1934 | Error | Could not find an implementation of the query pattern for source type ‘{0}’. ‘{1}’ not found. Consider explicitly specifying the type of the range variable ‘{2}’. |
CS1935 | Error | Could not find an implementation of the query pattern for source type ‘{0}’. ‘{1}’ not found. Are you missing required assembly references or a using directive for ‘System.Linq’? |
CS1936 | Error | Could not find an implementation of the query pattern for source type ‘{0}’. ‘{1}’ not found. |
CS1937 | Error | The name ‘{0}’ is not in scope on the left side of ‘equals’. Consider swapping the expressions on either side of ‘equals’. |
CS1938 | Error | The name ‘{0}’ is not in scope on the right side of ‘equals’. Consider swapping the expressions on either side of ‘equals’. |
CS1939 | Error | Cannot pass the range variable ‘{0}’ as an out or ref parameter |
CS1940 | Error | Multiple implementations of the query pattern were found for source type ‘{0}’. Ambiguous call to ‘{1}’. |
CS1941 | Error | The type of one of the expressions in the {0} clause is incorrect. Type inference failed in the call to ‘{1}’. |
CS1942 | Error | The type of the expression in the {0} clause is incorrect. Type inference failed in the call to ‘{1}’. |
CS1943 | Error | An expression of type ‘{0}’ is not allowed in a subsequent from clause in a query expression with source type ‘{1}’. Type inference failed in the call to ‘{2}’. |
CS1944 | Error | An expression tree may not contain an unsafe pointer operation |
CS1945 | Error | An expression tree may not contain an anonymous method expression |
CS1946 | Error | An anonymous method expression cannot be converted to an expression tree |
CS1947 | Error | Range variable ‘{0}’ cannot be assigned to — it is read only |
CS1948 | Error | The range variable ‘{0}’ cannot have the same name as a method type parameter |
CS1949 | Error | The contextual keyword ‘var’ cannot be used in a range variable declaration |
CS1950 | Error | The best overloaded Add method ‘{0}’ for the collection initializer has some invalid arguments |
CS1951 | Error | An expression tree lambda may not contain a ref, in or out parameter |
CS1952 | Error | An expression tree lambda may not contain a method with variable arguments |
CS1954 | Error | The best overloaded method match ‘{0}’ for the collection initializer element cannot be used. Collection initializer ‘Add’ methods cannot have ref or out parameters. |
CS1955 | Error | Non-invocable member ‘{0}’ cannot be used like a method. |
CS1956 | Warning | Member ‘{0}’ implements interface member ‘{1}’ in type ‘{2}’. There are multiple matches for the interface member at run-time. It is implementation dependent which method will be called. |
CS1957 | Warning | Member ‘{1}’ overrides ‘{0}’. There are multiple override candidates at run-time. It is implementation dependent which method will be called. Please use a newer runtime. |
CS1958 | Error | Object and collection initializer expressions may not be applied to a delegate creation expression |
CS1959 | Error | ‘{0}’ is of type ‘{1}’. The type specified in a constant declaration must be sbyte, byte, short, ushort, int, uint, long, ulong, char, float, double, decimal, bool, string, an enum-type, or a reference-type. |
CS1960 | Error | Invalid variance modifier. Only interface and delegate type parameters can be specified as variant. |
CS1961 | Error | Invalid variance: The type parameter ‘{1}’ must be {3} valid on ‘{0}’. ‘{1}’ is {2}. |
CS1962 | Error | The typeof operator cannot be used on the dynamic type |
CS1963 | Error | An expression tree may not contain a dynamic operation |
CS1964 | Error | ‘{0}’: user-defined conversions to or from the dynamic type are not allowed |
CS1965 | Error | ‘{0}’: cannot derive from the dynamic type |
CS1966 | Error | ‘{0}’: cannot implement a dynamic interface ‘{1}’ |
CS1967 | Error | Constraint cannot be the dynamic type |
CS1968 | Error | Constraint cannot be a dynamic type ‘{0}’ |
CS1969 | Error | One or more types required to compile a dynamic expression cannot be found. Are you missing a reference? |
CS1970 | Error | Do not use ‘System.Runtime.CompilerServices.DynamicAttribute’. Use the ‘dynamic’ keyword instead. |
CS1971 | Error | The call to method ‘{0}’ needs to be dynamically dispatched, but cannot be because it is part of a base access expression. Consider casting the dynamic arguments or eliminating the base access. |
CS1972 | Error | The indexer access needs to be dynamically dispatched, but cannot be because it is part of a base access expression. Consider casting the dynamic arguments or eliminating the base access. |
CS1973 | Error | ‘{0}’ has no applicable method named ‘{1}’ but appears to have an extension method by that name. Extension methods cannot be dynamically dispatched. Consider casting the dynamic arguments or calling the extension method without the extension method syntax. |
CS1974 | Warning | The dynamically dispatched call to method ‘{0}’ may fail at runtime because one or more applicable overloads are conditional methods. |
CS1975 | Error | The constructor call needs to be dynamically dispatched, but cannot be because it is part of a constructor initializer. Consider casting the dynamic arguments. |
CS1976 | Error | Cannot use a method group as an argument to a dynamically dispatched operation. Did you intend to invoke the method? |
CS1977 | Error | Cannot use a lambda expression as an argument to a dynamically dispatched operation without first casting it to a delegate or expression tree type. |
CS1978 | Error | Cannot use an expression of type ‘{0}’ as an argument to a dynamically dispatched operation. |
CS1979 | Error | Query expressions over source type ‘dynamic’ or with a join sequence of type ‘dynamic’ are not allowed |
CS1980 | Error | Cannot define a class or member that utilizes ‘dynamic’ because the compiler required type ‘{0}’ cannot be found. Are you missing a reference? |
CS1981 | Warning | Using ‘{0}’ to test compatibility with ‘{1}’ is essentially identical to testing compatibility with ‘{2}’ and will succeed for all non-null values |
CS1983 | Error | The return type of an async method must be void, Task, Task\<T\>, a task-like type, IAsyncEnumerable\<T\>, or IAsyncEnumerator\<T\> |
CS1984 | Error | Cannot await in the body of a finally clause |
CS1985 | Error | Cannot await in a catch clause |
CS1986 | Error | ‘await’ requires that the type {0} have a suitable ‘GetAwaiter’ method |
CS1988 | Error | Async methods cannot have ref, in or out parameters |
CS1989 | Error | Async lambda expressions cannot be converted to expression trees |
CS1991 | Error | ‘{0}’ cannot implement ‘{1}’ because ‘{2}’ is a Windows Runtime event and ‘{3}’ is a regular .NET event. |
CS1992 | Error | The ‘await’ operator can only be used when contained within a method or lambda expression marked with the ‘async’ modifier |
CS1994 | Error | The ‘async’ modifier can only be used in methods that have a body. |
CS1995 | Error | The ‘await’ operator may only be used in a query expression within the first collection expression of the initial ‘from’ clause or within the collection expression of a ‘join’ clause |
CS1996 | Error | Cannot await in the body of a lock statement |
CS1997 | Error | Since ‘{0}’ is an async method that returns ‘Task’, a return keyword must not be followed by an object expression. Did you intend to return ‘Task\<T\>‘? |
CS1998 | Warning | This async method lacks ‘await’ operators and will run synchronously. Consider using the ‘await’ operator to await non-blocking API calls, or ‘await Task.Run(…)’ to do CPU-bound work on a background thread. |