In this post, you’ll learn all the C# compiler error and warnings from the code CS8501 to CS9000.
C# Compiler Error Codes CS8501 to CS9000
Error Code | Type | Error/Warning Description |
---|---|---|
CS8502 | Error | Matching the tuple type ‘{0}’ requires ‘{1}’ subpatterns, but ‘{2}’ subpatterns are present. |
CS8503 | Error | A property subpattern requires a reference to the property or field to be matched, e.g. ‘{{ Name: {0} }}’ |
CS8504 | Error | Pattern missing |
CS8505 | Error | A default literal ‘default’ is not valid as a pattern. Use another literal (e.g. ‘0’ or ‘null’) as appropriate. To match everything, use a discard pattern ‘_‘. |
CS8506 | Error | No best type was found for the switch expression. |
CS8508 | Error | The syntax ‘var’ for a pattern is not permitted to refer to a type, but ‘{0}’ is in scope here. |
CS8509 | Warning | The switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern ‘{0}’ is not covered. |
CS8510 | Error | The pattern is unreachable. It has already been handled by a previous arm of the switch expression or it is impossible to match. |
CS8511 | Error | An expression of type ‘{0}’ cannot be handled by a pattern of type ‘{1}’. Please use language version ‘{2}’ or greater to match an open type with a constant pattern. |
CS8512 | Warning | The name ‘_‘ refers to the constant, not the discard pattern. Use ‘var _‘ to discard the value, or ‘@_‘ to refer to a constant by that name. |
CS8513 | Warning | The name ‘_‘ refers to the type ‘{0}’, not the discard pattern. Use ‘@_‘ for the type, or ‘var _‘ to discard. |
CS8514 | Error | An expression tree may not contain a switch expression. |
CS8515 | Error | Parentheses are required around the switch governing expression. |
CS8516 | Error | The name ‘{0}’ does not identify tuple element ‘{1}’. |
CS8517 | Error | The name ‘{0}’ does not match the corresponding ‘Deconstruct’ parameter ‘{1}’. |
CS8518 | Error | An expression of type ‘{0}’ can never match the provided pattern. |
CS8519 | Warning | The given expression never matches the provided pattern. |
CS8520 | Warning | The given expression always matches the provided constant. |
CS8521 | Error | Pattern-matching is not permitted for pointer types. |
CS8522 | Error | Element names are not permitted when pattern-matching via ‘System.Runtime.CompilerServices.ITuple’. |
CS8523 | Error | The discard pattern is not permitted as a case label in a switch statement. Use ‘case var _:’ for a discard pattern, or ‘case @_:’ for a constant named ‘_‘. |
CS8524 | Warning | The switch expression does not handle some values of its input type (it is not exhaustive) involving an unnamed enum value. For example, the pattern ‘{0}’ is not covered. |
CS8597 | Warning | Thrown value may be null. |
CS8598 | Error | The suppression operator is not allowed in this context |
CS8600 | Warning | Converting null literal or possible null value to non-nullable type. |
CS8601 | Warning | Possible null reference assignment. |
CS8602 | Warning | Dereference of a possibly null reference. |
CS8603 | Warning | Possible null reference return. |
CS8604 | Warning | Possible null reference argument for parameter ‘{0}’ in ‘{1}’. |
CS8605 | Warning | Unboxing a possibly null value. |
CS8607 | Warning | A possible null value may not be used for a type marked with [NotNull] or [DisallowNull] |
CS8608 | Warning | Nullability of reference types in type doesn’t match overridden member. |
CS8609 | Warning | Nullability of reference types in return type doesn’t match overridden member. |
CS8610 | Warning | Nullability of reference types in type of parameter ‘{0}’ doesn’t match overridden member. |
CS8611 | Warning | Nullability of reference types in type of parameter ‘{0}’ doesn’t match partial method declaration. |
CS8612 | Warning | Nullability of reference types in type of ‘{0}’ doesn’t match implicitly implemented member ‘{1}’. |
CS8613 | Warning | Nullability of reference types in return type of ‘{0}’ doesn’t match implicitly implemented member ‘{1}’. |
CS8614 | Warning | Nullability of reference types in type of parameter ‘{0}’ of ‘{1}’ doesn’t match implicitly implemented member ‘{2}’. |
CS8615 | Warning | Nullability of reference types in type doesn’t match implemented member ‘{0}’. |
CS8616 | Warning | Nullability of reference types in return type doesn’t match implemented member ‘{0}’. |
CS8617 | Warning | Nullability of reference types in type of parameter ‘{0}’ doesn’t match implemented member ‘{1}’. |
CS8618 | Warning | Non-nullable {0} ‘{1}’ must contain a non-null value when exiting constructor. Consider declaring the {0} as nullable. |
CS8619 | Warning | Nullability of reference types in value of type ‘{0}’ doesn’t match target type ‘{1}’. |
CS8620 | Warning | Argument of type ‘{0}’ cannot be used for parameter ‘{2}’ of type ‘{1}’ in ‘{3}’ due to differences in the nullability of reference types. |
CS8621 | Warning | Nullability of reference types in return type of ‘{0}’ doesn’t match the target delegate ‘{1}’ (possibly because of nullability attributes). |
CS8622 | Warning | Nullability of reference types in type of parameter ‘{0}’ of ‘{1}’ doesn’t match the target delegate ‘{2}’ (possibly because of nullability attributes). |
CS8623 | Error | Explicit application of ‘System.Runtime.CompilerServices.NullableAttribute’ is not allowed. |
CS8624 | Warning | Argument of type ‘{0}’ cannot be used as an output of type ‘{1}’ for parameter ‘{2}’ in ‘{3}’ due to differences in the nullability of reference types. |
CS8625 | Warning | Cannot convert null literal to non-nullable reference type. |
CS8627 | Error | A nullable type parameter must be known to be a value type or non-nullable reference type unless language version ‘{0}’ or greater is used. Consider changing the language version or adding a ‘class’, ‘struct’, or type constraint. |
CS8628 | Error | Cannot use a nullable reference type in object creation. |
CS8629 | Warning | Nullable value type may be null. |
CS8630 | Error | Invalid ‘{0}’ value: ‘{1}’ for C# {2}. Please use language version ‘{3}’ or greater. |
CS8631 | Warning | The type ‘{3}’ cannot be used as type parameter ‘{2}’ in the generic type or method ‘{0}’. Nullability of type argument ‘{3}’ doesn’t match constraint type ‘{1}’. |
CS8632 | Warning | The annotation for nullable reference types should only be used in code within a ‘#nullable’ annotations context. |
CS8633 | Warning | Nullability in constraints for type parameter ‘{0}’ of method ‘{1}’ doesn’t match the constraints for type parameter ‘{2}’ of interface method ‘{3}’. Consider using an explicit interface implementation instead. |
CS8634 | Warning | The type ‘{2}’ cannot be used as type parameter ‘{1}’ in the generic type or method ‘{0}’. Nullability of type argument ‘{2}’ doesn’t match ‘class’ constraint. |
CS8635 | Error | Unexpected character sequence ‘…’ |
CS8636 | Error | Invalid option ‘{0}’ for /nullable; must be ‘disable’, ‘enable’, ‘warnings’ or ‘annotations’ |
CS8637 | Error | Expected ‘enable’, ‘disable’, or ‘restore’ |
CS8639 | Error | The typeof operator cannot be used on a nullable reference type |
CS8640 | Error | Expression tree cannot contain value of ref struct or restricted type ‘{0}’. |
CS8641 | Error | ‘else’ cannot start a statement. |
CS8642 | Error | An expression tree may not contain a null coalescing assignment |
CS8643 | Warning | Nullability of reference types in explicit interface specifier doesn’t match interface implemented by the type. |
CS8644 | Warning | ‘{0}’ does not implement interface member ‘{1}’. Nullability of reference types in interface implemented by the base type doesn’t match. |
CS8645 | Warning | ‘{0}’ is already listed in the interface list on type ‘{1}’ with different nullability of reference types. |
CS8646 | Error | ‘{0}’ is explicitly implemented more than once. |
CS8647 | Error | A using variable cannot be used directly within a switch section (consider using braces). |
CS8648 | Error | A goto cannot jump to a location after a using declaration. |
CS8649 | Error | A goto cannot jump to a location before a using declaration within the same block. |
CS8650 | Error | It is not legal to use nullable reference type ‘{0}?’ in an is-type expression; use the underlying type ‘{0}’ instead. |
CS8651 | Error | It is not legal to use nullable reference type ‘{0}?’ in an as expression; use the underlying type ‘{0}’ instead. |
CS8652 | Error | The feature ‘{0}’ is currently in Preview and *unsupported*. To use Preview features, use the ‘preview’ language version. |
CS8655 | Warning | The switch expression does not handle some null inputs (it is not exhaustive). For example, the pattern ‘{0}’ is not covered. |
CS8656 | Warning | Call to non-readonly member ‘{0}’ from a ‘readonly’ member results in an implicit copy of ‘{1}’. |
CS8657 | Error | Static member ‘{0}’ cannot be marked ‘readonly’. |
CS8658 | Error | Auto-implemented ‘set’ accessor ‘{0}’ cannot be marked ‘readonly’. |
CS8659 | Error | Auto-implemented property ‘{0}’ cannot be marked ‘readonly’ because it has a ‘set’ accessor. |
CS8660 | Error | Cannot specify ‘readonly’ modifiers on both property or indexer ‘{0}’ and its accessor. Remove one of them. |
CS8661 | Error | Cannot specify ‘readonly’ modifiers on both accessors of property or indexer ‘{0}’. Instead, put a ‘readonly’ modifier on the property itself. |
CS8662 | Error | Field-like event ‘{0}’ cannot be ‘readonly’. |
CS8663 | Error | Both partial method declarations must be readonly or neither may be readonly |
CS8664 | Error | ‘{0}’: ‘readonly’ can only be used on accessors if the property or indexer has both a get and a set accessor |
CS8665 | Error | Method ‘{0}’ specifies a ‘class’ constraint for type parameter ‘{1}’, but corresponding type parameter ‘{2}’ of overridden or explicitly implemented method ‘{3}’ is not a reference type. |
CS8666 | Error | Method ‘{0}’ specifies a ‘struct’ constraint for type parameter ‘{1}’, but corresponding type parameter ‘{2}’ of overridden or explicitly implemented method ‘{3}’ is not a non-nullable value type. |
CS8667 | Warning | Partial method declarations of ‘{0}’ have inconsistent nullability in constraints for type parameter ‘{1}’ |
CS8668 | Error | Expected ‘warnings’, ‘annotations’, or end of directive |
CS8669 | Warning | The annotation for nullable reference types should only be used in code within a ‘#nullable’ annotations context. Auto-generated code requires an explicit ‘#nullable’ directive in source. |
CS8670 | Warning | Object or collection initializer implicitly dereferences possibly null member ‘{0}’. |
CS8700 | Error | Multiple analyzer config files cannot be in the same directory (‘{0}’). |
CS8701 | Error | Target runtime doesn’t support default interface implementation. |
CS8702 | Error | ‘{0}’ cannot implement interface member ‘{1}’ in type ‘{2}’ because the target runtime doesn’t support default interface implementation. |
CS8703 | Error | The modifier ‘{0}’ is not valid for this item in C# {1}. Please use language version ‘{2}’ or greater. |
CS8704 | Error | ‘{0}’ does not implement interface member ‘{1}’. ‘{2}’ cannot implicitly implement a non-public member in C# {3}. Please use language version ‘{4}’ or greater. |
CS8705 | Error | Interface member ‘{0}’ does not have a most specific implementation. Neither ‘{1}’, nor ‘{2}’ are most specific. |
CS8706 | Error | ‘{0}’ cannot implement interface member ‘{1}’ in type ‘{2}’ because feature ‘{3}’ is not available in C# {4}. Please use language version ‘{5}’ or greater. |
CS8707 | Error | Target runtime doesn’t support ‘protected’, ‘protected internal’, or ‘private protected’ accessibility for a member of an interface. |
CS8711 | Error | Type ‘{0}’ cannot be embedded because it has a non-abstract member. Consider setting the ‘Embed Interop Types’ property to false. |
CS8712 | Error | ‘{0}’: abstract event cannot use event accessor syntax |
CS8714 | Warning | The type ‘{2}’ cannot be used as type parameter ‘{1}’ in the generic type or method ‘{0}’. Nullability of type argument ‘{2}’ doesn’t match ‘notnull’ constraint. |
CS8715 | Error | Duplicate null suppression operator (‘!’) |
CS8716 | Error | There is no target type for the default literal. |
CS8750 | Error | Type ‘{0}’ cannot be embedded because it has a re-abstraction of a member from base interface. Consider setting the ‘Embed Interop Types’ property to false. |
CS8751 | Error | Internal error in the C# compiler. |
CS8752 | Error | The type ‘{0}’ may not be used as the target type of new() |
CS8753 | Error | Use of new() is not valid in this context |
CS8754 | Error | There is no target type for ‘{0}’ |
CS8755 | Error | ‘{0}’ cannot be used as a modifier on a function pointer parameter. |
CS8756 | Error | Function pointer ‘{0}’ does not take {1} arguments |
CS8757 | Error | No overload for ‘{0}’ matches function pointer ‘{1}’ |
CS8758 | Error | Ref mismatch between ‘{0}’ and function pointer ‘{1}’ |
CS8759 | Error | Cannot create a function pointer for ‘{0}’ because it is not a static method |
CS8760 | Error | ‘{0}’: extern event cannot have initializer |
CS8761 | Error | Operator ‘{0}’ cannot be applied to ‘default’ and operand of type ‘{1}’ because it is a type parameter that is not known to be a reference type |
CS8762 | Warning | Parameter ‘{0}’ must have a non-null value when exiting with ‘{1}’. |
CS8763 | Warning | A method marked [DoesNotReturn] should not return. |
CS8764 | Warning | Nullability of return type doesn’t match overridden member (possibly because of nullability attributes). |
CS8765 | Warning | Nullability of type of parameter ‘{0}’ doesn’t match overridden member (possibly because of nullability attributes). |
CS8766 | Warning | Nullability of reference types in return type of ‘{0}’ doesn’t match implicitly implemented member ‘{1}’ (possibly because of nullability attributes). |
CS8767 | Warning | Nullability of reference types in type of parameter ‘{0}’ of ‘{1}’ doesn’t match implicitly implemented member ‘{2}’ (possibly because of nullability attributes). |
CS8768 | Warning | Nullability of reference types in return type doesn’t match implemented member ‘{0}’ (possibly because of nullability attributes). |
CS8769 | Warning | Nullability of reference types in type of parameter ‘{0}’ doesn’t match implemented member ‘{1}’ (possibly because of nullability attributes). |
CS8770 | Warning | Method ‘{0}’ lacks [DoesNotReturn] annotation to match implemented or overridden member. |
CS8771 | Error | Output directory could not be determined |
CS8772 | Error | stdin argument ‘-‘ is specified, but input has not been redirected from the standard input stream. |
CS8773 | Error | Feature ‘{0}’ is not available in C# 9.0. Please use language version {1} or greater. |
CS8774 | Warning | Member ‘{0}’ must have a non-null value when exiting. |
CS8775 | Warning | Member ‘{0}’ must have a non-null value when exiting with ‘{1}’. |
CS8776 | Warning | Member ‘{0}’ cannot be used in this attribute. |
CS8777 | Warning | Parameter ‘{0}’ must have a non-null value when exiting. |
CS8778 | Warning | Constant value ‘{0}’ may overflow ‘{1}’ at runtime (use ‘unchecked’ syntax to override) |
CS8779 | Error | ‘{0}’ is already listed in the interface list on type ‘{2}’ as ‘{1}’. |
CS8780 | Error | A variable may not be declared within a ‘not’ or ‘or’ pattern. |
CS8781 | Error | Relational patterns may not be used for a value of type ‘{0}’. |
CS8782 | Error | Relational patterns may not be used for a floating-point NaN. |
CS8783 | Error | Local function ‘{0}’ must be ‘static’ in order to use the Conditional attribute |
CS8784 | Warning | Generator ‘{0}’ failed to initialize. It will not contribute to the output and compilation errors may occur as a result. Exception was of type ‘{1}’ with message ‘{2}’ |
CS8785 | Warning | Generator ‘{0}’ failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type ‘{1}’ with message ‘{2}’ |
CS8786 | Error | Calling convention of ‘{0}’ is not compatible with ‘{1}’. |
CS8787 | Error | Cannot convert method group to function pointer (Are you missing a ‘&’?) |
CS8788 | Error | Cannot use an extension method with a receiver as the target of a ‘&’ operator. |
CS8789 | Error | The type of a local declared in a fixed statement cannot be a function pointer type. |
CS8790 | Error | An expression tree may not contain a pattern System.Index or System.Range indexer access |
CS8791 | Error | An expression tree may not contain a from-end index (‘^’) expression. |
CS8792 | Error | An expression tree may not contain a range (‘..’) expression. |
CS8793 | Warning | The given expression always matches the provided pattern. |
CS8794 | Warning | An expression of type ‘{0}’ always matches the provided pattern. |
CS8795 | Error | Partial method ‘{0}’ must have an implementation part because it has accessibility modifiers. |
CS8796 | Error | Partial method ‘{0}’ must have accessibility modifiers because it has a non-void return type. |
CS8797 | Error | Partial method ‘{0}’ must have accessibility modifiers because it has ‘out’ parameters. |
CS8798 | Error | Partial method ‘{0}’ must have accessibility modifiers because it has a ‘virtual’, ‘override’, ‘sealed’, ‘new’, or ‘extern’ modifier. |
CS8799 | Error | Both partial method declarations must have identical accessibility modifiers. |
CS8800 | Error | Both partial method declarations must have identical combinations of ‘virtual’, ‘override’, ‘sealed’, and ‘new’ modifiers. |
CS8801 | Error | Cannot use local variable or local function ‘{0}’ declared in a top-level statement in this context. |
CS8802 | Error | Only one compilation unit can have top-level statements. |
CS8803 | Error | Top-level statements must precede namespace and type declarations. |
CS8804 | Error | Cannot specify /main if there is a compilation unit with top-level statements. |
CS8805 | Error | Program using top-level statements must be an executable. |
CS8806 | Error | The calling convention of ‘{0}’ is not supported by the language. |
CS8807 | Error | ‘{0}’ is not a valid calling convention specifier for a function pointer. |
CS8808 | Error | ‘{0}’ is not a valid function pointer return type modifier. Valid modifiers are ‘ref’ and ‘ref readonly’. |
CS8809 | Error | A return type can only have one ‘{0}’ modifier. |
CS8810 | Error | ‘&’ on method groups cannot be used in expression trees |
CS8811 | Error | Cannot convert &method group ‘{0}’ to delegate type ‘{1}’. |
CS8812 | Error | Cannot convert &method group ‘{0}’ to non-function pointer type ‘{1}’. |
CS8813 | Error | A module initializer must be an ordinary member method |
CS8814 | Error | Module initializer method ‘{0}’ must be accessible at the module level |
CS8815 | Error | Module initializer method ‘{0}’ must be static, and non-virtual, must have no parameters, and must return ‘void’ |
CS8816 | Error | Module initializer method ‘{0}’ must not be generic and must not be contained in a generic type |
CS8817 | Error | Both partial method declarations must have the same return type. |
CS8818 | Error | Partial method declarations must have matching ref return values. |
CS8819 | Warning | Nullability of reference types in return type doesn’t match partial method declaration. |
CS8820 | Error | A static anonymous function cannot contain a reference to ‘{0}’. |
CS8821 | Error | A static anonymous function cannot contain a reference to ‘this’ or ‘base’. |
CS8822 | Error | Method ‘{0}’ specifies a ‘default’ constraint for type parameter ‘{1}’, but corresponding type parameter ‘{2}’ of overridden or explicitly implemented method ‘{3}’ is constrained to a reference type or a value type. |
CS8823 | Error | The ‘default’ constraint is valid on override and explicit interface implementation methods only. |
CS8824 | Warning | Parameter ‘{0}’ must have a non-null value when exiting because parameter ‘{1}’ is non-null. |
CS8825 | Warning | Return value must be non-null because parameter ‘{0}’ is non-null. |
CS8826 | Warning | Partial method declarations ‘{0}’ and ‘{1}’ have signature differences. |
CS8830 | Error | ‘{0}’: Target runtime doesn’t support covariant return types in overrides. Return type must be ‘{2}’ to match overridden member ‘{1}’ |
CS8831 | Error | ‘{0}’: Target runtime doesn’t support covariant types in overrides. Type must be ‘{2}’ to match overridden member ‘{1}’ |
CS8846 | Warning | The switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern ‘{0}’ is not covered. However, a pattern with a ‘when’ clause might successfully match this value. |
CS8847 | Warning | The switch expression does not handle some null inputs (it is not exhaustive). For example, the pattern ‘{0}’ is not covered. However, a pattern with a ‘when’ clause might successfully match this value. |
CS8848 | Warning | Operator ‘{0}’ cannot be used here due to precedence. Use parentheses to disambiguate. |
CS8849 | Error | An expression tree may not contain a with-expression. |
CS8850 | Warning | The assembly ‘{0}’ containing type ‘{1}’ references .NET Framework, which is not supported. |
CS8851 | Warning | ‘{0}’ defines ‘Equals’ but not ‘GetHashCode’ |
CS8852 | Error | Init-only property or indexer ‘{0}’ can only be assigned in an object initializer, or on ‘this’ or ‘base’ in an instance constructor or an ‘init’ accessor. |
CS8853 | Error | ‘{0}’ must match by init-only of overridden member ‘{1}’ |
CS8854 | Error | ‘{0}’ does not implement interface member ‘{1}’. ‘{2}’ cannot implement ‘{1}’. |
CS8855 | Error | Accessors ‘{0}’ and ‘{1}’ should both be init-only or neither |
CS8856 | Error | The ‘init’ accessor is not valid on static members |
CS8857 | Error | The receiver of a with expression must have a non-void type. |
CS8858 | Error | The receiver type ‘{0}’ is not a valid record type and is not a struct type. |
CS8859 | Error | Members named ‘Clone’ are disallowed in records. |
CS8860 | Warning | Types and aliases should not be named ‘record’. |
CS8861 | Error | Unexpected argument list. |
CS8862 | Error | A constructor declared in a record with parameter list must have ‘this’ constructor initializer. |
CS8863 | Error | Only a single record partial declaration may have a parameter list |
CS8864 | Error | Records may only inherit from object or another record |
CS8865 | Error | Only records may inherit from records. |
CS8866 | Error | Record member ‘{0}’ must be a readable instance property or field of type ‘{1}’ to match positional parameter ‘{2}’. |
CS8867 | Error | No accessible copy constructor found in base type ‘{0}’. |
CS8868 | Error | A copy constructor in a record must call a copy constructor of the base, or a parameterless object constructor if the record inherits from object. |
CS8869 | Error | ‘{0}’ does not override expected method from ‘object’. |
CS8870 | Error | ‘{0}’ cannot be sealed because containing record is not sealed. |
CS8871 | Error | ‘{0}’ does not override expected method from ‘{1}’. |
CS8872 | Error | ‘{0}’ must allow overriding because the containing record is not sealed. |
CS8873 | Error | Record member ‘{0}’ must be public. |
CS8874 | Error | Record member ‘{0}’ must return ‘{1}’. |
CS8875 | Error | Record member ‘{0}’ must be protected. |
CS8876 | Error | ‘{0}’ does not override expected property from ‘{1}’. |
CS8877 | Error | Record member ‘{0}’ may not be static. |
CS8878 | Error | A copy constructor ‘{0}’ must be public or protected because the record is not sealed. |
CS8879 | Error | Record member ‘{0}’ must be private. |
CS8880 | Warning | Auto-implemented property ‘{0}’ must be fully assigned before control is returned to the caller. Consider updating to language version ‘{1}’ to auto-default the property. |
CS8881 | Warning | Field ‘{0}’ must be fully assigned before control is returned to the caller. Consider updating to language version ‘{1}’ to auto-default the field. |
CS8882 | Warning | The out parameter ‘{0}’ must be assigned to before control leaves the current method |
CS8883 | Warning | Use of possibly unassigned auto-implemented property ‘{0}’ |
CS8884 | Warning | Use of possibly unassigned field ‘{0}’ |
CS8885 | Warning | The ‘this’ object cannot be used before all of its fields have been assigned. Consider updating to language version ‘{0}’ to auto-default the unassigned fields. |
CS8886 | Warning | Use of unassigned out parameter ‘{0}’ |
CS8887 | Warning | Use of unassigned local variable ‘{0}’ |
CS8888 | Error | ‘managed’ calling convention cannot be combined with unmanaged calling convention specifiers. |
CS8889 | Error | The target runtime doesn’t support extensible or runtime-environment default calling conventions. |
CS8890 | Error | Type ‘{0}’ is not defined. |
CS8891 | Error | Type ‘{0}’ must be public to be used as a calling convention. |
CS8892 | Warning | Method ‘{0}’ will not be used as an entry point because a synchronous entry point ‘{1}’ was found. |
CS8893 | Error | ‘{0}’ is not a valid calling convention type for ‘UnmanagedCallersOnly’. |
CS8894 | Error | Cannot use ‘{0}’ as a {1} type on a method attributed with ‘UnmanagedCallersOnly’. |
CS8895 | Error | Methods attributed with ‘UnmanagedCallersOnly’ cannot have generic type parameters and cannot be declared in a generic type. |
CS8896 | Error | ‘UnmanagedCallersOnly’ can only be applied to ordinary static non-abstract, non-virtual methods or static local functions. |
CS8897 | Warning | ‘{0}’: static types cannot be used as parameters |
CS8898 | Warning | ‘{0}’: static types cannot be used as return types |
CS8899 | Error | Application entry points cannot be attributed with ‘UnmanagedCallersOnly’. |
CS8900 | Error | Module initializer cannot be attributed with ‘UnmanagedCallersOnly’. |
CS8901 | Error | ‘{0}’ is attributed with ‘UnmanagedCallersOnly’ and cannot be called directly. Obtain a function pointer to this method. |
CS8902 | Error | ‘{0}’ is attributed with ‘UnmanagedCallersOnly’ and cannot be converted to a delegate type. Obtain a function pointer to this method. |
CS8903 | Error | ‘init’ accessors cannot be marked ‘readonly’. Mark ‘{0}’ readonly instead. |
CS8904 | Error | Invalid variance: The type parameter ‘{1}’ must be {3} valid on ‘{0}’ unless language version ‘{4}’ or greater is used. ‘{1}’ is {2}. |
CS8905 | Error | A function pointer cannot be called with named arguments. |
CS8906 | Error | Record equality contract property ‘{0}’ must have a get accessor. |
CS8907 | Warning | Parameter ‘{0}’ is unread. Did you forget to use it to initialize the property with that name? |
CS8908 | Error | The type ‘{0}’ may not be used for a field of a record. |
CS8909 | Warning | Comparison of function pointers might yield an unexpected result, since pointers to the same function may be distinct. |
CS8910 | Error | The primary constructor conflicts with the synthesized copy constructor. |
CS8911 | Error | Using a function pointer type in a ‘typeof’ in an attribute is not supported. |
CS8912 | Error | Inheriting from a record with a sealed ‘Object.ToString’ is not supported in C# {0}. Please use language version ‘{1}’ or greater. |
CS8913 | Error | The positional member ‘{0}’ found corresponding to this parameter is hidden. |
CS8914 | Error | A global using directive cannot be used in a namespace declaration. |
CS8915 | Error | A global using directive must precede all non-global using directives. |
CS8916 | Error | Attributes on lambda expressions require a parenthesized parameter list. |
CS8917 | Error | The delegate type could not be inferred. |
CS8918 | Error | Identifier or a simple member access expected. |
CS8919 | Error | Target runtime doesn’t support static abstract members in interfaces. |
CS8920 | Error | The interface ‘{0}’ cannot be used as type argument. Static member ‘{1}’ does not have a most specific implementation in the interface. |
CS8921 | Error | The parameter of a unary operator must be the containing type, or its type parameter constrained to it. |
CS8922 | Error | The parameter type for ++ or — operator must be the containing type, or its type parameter constrained to it. |
CS8923 | Error | The return type for ++ or — operator must either match the parameter type, or be derived from the parameter type, or be the containing type’s type parameter constrained to it unless the parameter type is a different type parameter. |
CS8924 | Error | One of the parameters of a binary operator must be the containing type, or its type parameter constrained to it. |
CS8925 | Error | The first operand of an overloaded shift operator must have the same type as the containing type or its type parameter constrained to it |
CS8926 | Error | A static virtual or abstract interface member can be accessed only on a type parameter. |
CS8927 | Error | An expression tree may not contain an access of static virtual or abstract interface member |
CS8928 | Error | ‘{0}’ does not implement static interface member ‘{1}’. ‘{2}’ cannot implement the interface member because it is not static. |
CS8929 | Error | ‘{0}’ cannot implement interface member ‘{1}’ in type ‘{2}’ because the target runtime doesn’t support static abstract members in interfaces. |
CS8930 | Error | Explicit implementation of a user-defined operator ‘{0}’ must be declared static |
CS8931 | Error | User-defined conversion in an interface must convert to or from a type parameter on the enclosing type constrained to the enclosing type |
CS8932 | Error | ‘UnmanagedCallersOnly’ method ‘{0}’ cannot implement interface member ‘{1}’ in type ‘{2}’ |
CS8933 | Hidden | The using directive for ‘{0}’ appeared previously as global using |
CS8934 | Error | Cannot convert {0} to type ‘{1}’ because the return type does not match the delegate return type |
CS8935 | Error | The AsyncMethodBuilder attribute is disallowed on anonymous methods without an explicit return type. |
CS8936 | Error | Feature ‘{0}’ is not available in C# 10.0. Please use language version {1} or greater. |
CS8937 | Error | At least one top-level statement must be non-empty. |
CS8938 | Error | The #line directive value is missing or out of range |
CS8939 | Error | The #line directive end position must be greater than or equal to the start position |
CS8940 | Error | A generic task-like return type was expected, but the type ‘{0}’ found in ‘AsyncMethodBuilder’ attribute was not suitable. It must be an unbound generic type of arity one, and its containing type (if any) must be non-generic. |
CS8941 | Error | Interpolated string handler method ‘{0}’ is malformed. It does not return ‘void’ or ‘bool’. |
CS8942 | Error | Interpolated string handler method ‘{0}’ has inconsistent return type. Expected to return ‘{1}’. |
CS8943 | Error | null is not a valid parameter name. To get access to the receiver of an instance method, use the empty string as the parameter name. |
CS8944 | Error | ‘{0}’ is not an instance method, the receiver cannot be an interpolated string handler argument. |
CS8945 | Error | ‘{0}’ is not a valid parameter name from ‘{1}’. |
CS8946 | Error | ‘{0}’ is not an interpolated string handler type. |
CS8947 | Warning | Parameter ‘{0}’ occurs after ‘{1}’ in the parameter list, but is used as an argument for interpolated string handler conversions. This will require the caller to reorder parameters with named arguments at the call site. Consider putting the interpolated string handler parameter after all arguments involved. |
CS8948 | Error | InterpolatedStringHandlerArgumentAttribute arguments cannot refer to the parameter the attribute is used on. |
CS8949 | Error | The InterpolatedStringHandlerArgumentAttribute applied to parameter ‘{0}’ is malformed and cannot be interpreted. Construct an instance of ‘{1}’ manually. |
CS8950 | Error | Parameter ‘{0}’ is an argument to the interpolated string handler conversion on parameter ‘{1}’, but the corresponding argument is specified after the interpolated string expression. Reorder the arguments to move ‘{0}’ before ‘{1}’. |
CS8951 | Error | Parameter ‘{0}’ is not explicitly provided, but is used as an argument to the interpolated string handler conversion on parameter ‘{1}’. Specify the value of ‘{0}’ before ‘{1}’. |
CS8952 | Error | An expression tree may not contain an interpolated string handler conversion. |
CS8953 | Error | An interpolated string handler construction cannot use dynamic. Manually construct an instance of ‘{0}’. |
CS8954 | Error | Source file can only contain one file-scoped namespace declaration. |
CS8955 | Error | Source file can not contain both file-scoped and normal namespace declarations. |
CS8956 | Error | File-scoped namespace must precede all other members in a file. |
CS8957 | Error | Conditional expression is not valid in language version {0} because a common type was not found between ‘{1}’ and ‘{2}’. To use a target-typed conversion, upgrade to language version {3} or greater. |
CS8958 | Error | The parameterless struct constructor must be ‘public’. |
CS8959 | Error | CallerArgumentExpressionAttribute cannot be applied because there are no standard conversions from type ‘{0}’ to type ‘{1}’ |
CS8960 | Warning | The CallerArgumentExpressionAttribute applied to parameter ‘{0}’ will have no effect. It is overridden by the CallerLineNumberAttribute. |
CS8961 | Warning | The CallerArgumentExpressionAttribute applied to parameter ‘{0}’ will have no effect. It is overridden by the CallerFilePathAttribute. |
CS8962 | Warning | The CallerArgumentExpressionAttribute applied to parameter ‘{0}’ will have no effect. It is overridden by the CallerMemberNameAttribute. |
CS8963 | Warning | The CallerArgumentExpressionAttribute applied to parameter ‘{0}’ will have no effect. It is applied with an invalid parameter name. |
CS8964 | Error | The CallerArgumentExpressionAttribute may only be applied to parameters with default values |
CS8965 | Warning | The CallerArgumentExpressionAttribute applied to parameter ‘{0}’ will have no effect because it’s self-referential. |
CS8966 | Warning | The CallerArgumentExpressionAttribute applied to parameter ‘{0}’ will have no effect because it applies to a member that is used in contexts that do not allow optional arguments |
CS8967 | Error | Newlines inside a non-verbatim interpolated string are not supported in C# {0}. Please use language version {1} or greater. |
CS8968 | Error | ‘{0}’: an attribute type argument cannot use type parameters |
CS8970 | Error | Type ‘{0}’ cannot be used in this context because it cannot be represented in metadata. |
CS8971 | Warning | InterpolatedStringHandlerArgument has no effect when applied to lambda parameters and will be ignored at the call site. |
CS8972 | Error | A lambda expression with attributes cannot be converted to an expression tree |
CS8973 | Warning | The operation may overflow ‘{0}’ at runtime (use ‘unchecked’ syntax to override) |
CS8974 | Warning | Converting method group ‘{0}’ to non-delegate type ‘{1}’. Did you intend to invoke the method? |
CS8975 | Error | The contextual keyword ‘var’ cannot be used as an explicit lambda return type |
CS8976 | Error | Interpolated string handler conversions that reference the instance being indexed cannot be used in indexer member initializers. |
CS8977 | Error | Cannot use ‘ref’, ‘in’, or ‘out’ in the signature of a method attributed with ‘UnmanagedCallersOnly’. |
CS8978 | Error | ‘{0}’ cannot be made nullable. |
CS8979 | Error | List patterns may not be used for a value of type ‘{0}’. |
CS8980 | Error | Slice patterns may only be used once and directly inside a list pattern. |
CS8981 | Warning | The type name ‘{0}’ only contains lower-cased ascii characters. Such names may become reserved for the language. |
CS8982 | Error | A constructor declared in a ‘record struct’ with parameter list must have a ‘this’ initializer that calls the primary constructor or an explicitly declared constructor. |
CS8983 | Error | A ‘struct’ with field initializers must include an explicitly declared constructor. |
CS8984 | Error | Cannot update because an inferred delegate type has changed. |
CS8985 | Error | List patterns may not be used for a value of type ‘{0}’. No suitable ‘Length’ or ‘Count’ property was found. |
CS8986 | Error | The ‘scoped’ modifier of parameter ‘{0}’ doesn’t match target ‘{1}’. |
CS8987 | Error | The ‘scoped’ modifier of parameter ‘{0}’ doesn’t match overridden or implemented member. |
CS8988 | Error | The ‘scoped’ modifier of parameter ‘{0}’ doesn’t match partial method declaration. |
CS8989 | Error | The ‘parameter null-checking’ feature is not supported. |
CS8996 | Error | Raw string literals are not allowed in preprocessor directives. |
CS8997 | Error | Unterminated raw string literal. |
CS8998 | Error | The raw string literal does not start with enough quote characters to allow this many consecutive quote characters as content. |
CS8999 | Error | Line does not start with the same whitespace as the closing line of the raw string literal. |
CS9000 | Error | Raw string literal delimiter must be on its own line. |