C# Compiler Error Codes CS8501 to CS9000

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 CodeTypeError/Warning Description
CS8502ErrorMatching the tuple type ‘{0}’ requires ‘{1}’ subpatterns, but ‘{2}’ subpatterns are present.
CS8503ErrorA property subpattern requires a reference to the property or field to be matched, e.g. ‘{{ Name: {0} }}’
CS8504ErrorPattern missing
CS8505ErrorA 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 ‘_‘.
CS8506ErrorNo best type was found for the switch expression.
CS8508ErrorThe syntax ‘var’ for a pattern is not permitted to refer to a type, but ‘{0}’ is in scope here.
CS8509WarningThe switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern ‘{0}’ is not covered.
CS8510ErrorThe pattern is unreachable. It has already been handled by a previous arm of the switch expression or it is impossible to match.
CS8511ErrorAn 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.
CS8512WarningThe name ‘_‘ refers to the constant, not the discard pattern. Use ‘var _‘ to discard the value, or ‘@_‘ to refer to a constant by that name.
CS8513WarningThe name ‘_‘ refers to the type ‘{0}’, not the discard pattern. Use ‘@_‘ for the type, or ‘var _‘ to discard.
CS8514ErrorAn expression tree may not contain a switch expression.
CS8515ErrorParentheses are required around the switch governing expression.
CS8516ErrorThe name ‘{0}’ does not identify tuple element ‘{1}’.
CS8517ErrorThe name ‘{0}’ does not match the corresponding ‘Deconstruct’ parameter ‘{1}’.
CS8518ErrorAn expression of type ‘{0}’ can never match the provided pattern.
CS8519WarningThe given expression never matches the provided pattern.
CS8520WarningThe given expression always matches the provided constant.
CS8521ErrorPattern-matching is not permitted for pointer types.
CS8522ErrorElement names are not permitted when pattern-matching via ‘System.Runtime.CompilerServices.ITuple’.
CS8523ErrorThe 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 ‘_‘.
CS8524WarningThe 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.
CS8597WarningThrown value may be null.
CS8598ErrorThe suppression operator is not allowed in this context
CS8600WarningConverting null literal or possible null value to non-nullable type.
CS8601WarningPossible null reference assignment.
CS8602WarningDereference of a possibly null reference.
CS8603WarningPossible null reference return.
CS8604WarningPossible null reference argument for parameter ‘{0}’ in ‘{1}’.
CS8605WarningUnboxing a possibly null value.
CS8607WarningA possible null value may not be used for a type marked with [NotNull] or [DisallowNull]
CS8608WarningNullability of reference types in type doesn’t match overridden member.
CS8609WarningNullability of reference types in return type doesn’t match overridden member.
CS8610WarningNullability of reference types in type of parameter ‘{0}’ doesn’t match overridden member.
CS8611WarningNullability of reference types in type of parameter ‘{0}’ doesn’t match partial method declaration.
CS8612WarningNullability of reference types in type of ‘{0}’ doesn’t match implicitly implemented member ‘{1}’.
CS8613WarningNullability of reference types in return type of ‘{0}’ doesn’t match implicitly implemented member ‘{1}’.
CS8614WarningNullability of reference types in type of parameter ‘{0}’ of ‘{1}’ doesn’t match implicitly implemented member ‘{2}’.
CS8615WarningNullability of reference types in type doesn’t match implemented member ‘{0}’.
CS8616WarningNullability of reference types in return type doesn’t match implemented member ‘{0}’.
CS8617WarningNullability of reference types in type of parameter ‘{0}’ doesn’t match implemented member ‘{1}’.
CS8618WarningNon-nullable {0} ‘{1}’ must contain a non-null value when exiting constructor. Consider declaring the {0} as nullable.
CS8619WarningNullability of reference types in value of type ‘{0}’ doesn’t match target type ‘{1}’.
CS8620WarningArgument of type ‘{0}’ cannot be used for parameter ‘{2}’ of type ‘{1}’ in ‘{3}’ due to differences in the nullability of reference types.
CS8621WarningNullability of reference types in return type of ‘{0}’ doesn’t match the target delegate ‘{1}’ (possibly because of nullability attributes).
CS8622WarningNullability of reference types in type of parameter ‘{0}’ of ‘{1}’ doesn’t match the target delegate ‘{2}’ (possibly because of nullability attributes).
CS8623ErrorExplicit application of ‘System.Runtime.CompilerServices.NullableAttribute’ is not allowed.
CS8624WarningArgument 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.
CS8625WarningCannot convert null literal to non-nullable reference type.
CS8627ErrorA 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.
CS8628ErrorCannot use a nullable reference type in object creation.
CS8629WarningNullable value type may be null.
CS8630ErrorInvalid ‘{0}’ value: ‘{1}’ for C# {2}. Please use language version ‘{3}’ or greater.
CS8631WarningThe 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}’.
CS8632WarningThe annotation for nullable reference types should only be used in code within a ‘#nullable’ annotations context.
CS8633WarningNullability 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.
CS8634WarningThe 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.
CS8635ErrorUnexpected character sequence ‘…’
CS8636ErrorInvalid option ‘{0}’ for /nullable; must be ‘disable’, ‘enable’, ‘warnings’ or ‘annotations’
CS8637ErrorExpected ‘enable’, ‘disable’, or ‘restore’
CS8639ErrorThe typeof operator cannot be used on a nullable reference type
CS8640ErrorExpression tree cannot contain value of ref struct or restricted type ‘{0}’.
CS8641Error‘else’ cannot start a statement.
CS8642ErrorAn expression tree may not contain a null coalescing assignment
CS8643WarningNullability of reference types in explicit interface specifier doesn’t match interface implemented by the type.
CS8644Warning‘{0}’ does not implement interface member ‘{1}’. Nullability of reference types in interface implemented by the base type doesn’t match.
CS8645Warning‘{0}’ is already listed in the interface list on type ‘{1}’ with different nullability of reference types.
CS8646Error‘{0}’ is explicitly implemented more than once.
CS8647ErrorA using variable cannot be used directly within a switch section (consider using braces).
CS8648ErrorA goto cannot jump to a location after a using declaration.
CS8649ErrorA goto cannot jump to a location before a using declaration within the same block.
CS8650ErrorIt is not legal to use nullable reference type ‘{0}?’ in an is-type expression; use the underlying type ‘{0}’ instead.
CS8651ErrorIt is not legal to use nullable reference type ‘{0}?’ in an as expression; use the underlying type ‘{0}’ instead.
CS8652ErrorThe feature ‘{0}’ is currently in Preview and *unsupported*. To use Preview features, use the ‘preview’ language version.
CS8655WarningThe switch expression does not handle some null inputs (it is not exhaustive). For example, the pattern ‘{0}’ is not covered.
CS8656WarningCall to non-readonly member ‘{0}’ from a ‘readonly’ member results in an implicit copy of ‘{1}’.
CS8657ErrorStatic member ‘{0}’ cannot be marked ‘readonly’.
CS8658ErrorAuto-implemented ‘set’ accessor ‘{0}’ cannot be marked ‘readonly’.
CS8659ErrorAuto-implemented property ‘{0}’ cannot be marked ‘readonly’ because it has a ‘set’ accessor.
CS8660ErrorCannot specify ‘readonly’ modifiers on both property or indexer ‘{0}’ and its accessor. Remove one of them.
CS8661ErrorCannot specify ‘readonly’ modifiers on both accessors of property or indexer ‘{0}’. Instead, put a ‘readonly’ modifier on the property itself.
CS8662ErrorField-like event ‘{0}’ cannot be ‘readonly’.
CS8663ErrorBoth partial method declarations must be readonly or neither may be readonly
CS8664Error‘{0}’: ‘readonly’ can only be used on accessors if the property or indexer has both a get and a set accessor
CS8665ErrorMethod ‘{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.
CS8666ErrorMethod ‘{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.
CS8667WarningPartial method declarations of ‘{0}’ have inconsistent nullability in constraints for type parameter ‘{1}’
CS8668ErrorExpected ‘warnings’, ‘annotations’, or end of directive
CS8669WarningThe 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.
CS8670WarningObject or collection initializer implicitly dereferences possibly null member ‘{0}’.
CS8700ErrorMultiple analyzer config files cannot be in the same directory (‘{0}’).
CS8701ErrorTarget runtime doesn’t support default interface implementation.
CS8702Error‘{0}’ cannot implement interface member ‘{1}’ in type ‘{2}’ because the target runtime doesn’t support default interface implementation.
CS8703ErrorThe modifier ‘{0}’ is not valid for this item in C# {1}. Please use language version ‘{2}’ or greater.
CS8704Error‘{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.
CS8705ErrorInterface member ‘{0}’ does not have a most specific implementation. Neither ‘{1}’, nor ‘{2}’ are most specific.
CS8706Error‘{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.
CS8707ErrorTarget runtime doesn’t support ‘protected’, ‘protected internal’, or ‘private protected’ accessibility for a member of an interface.
CS8711ErrorType ‘{0}’ cannot be embedded because it has a non-abstract member. Consider setting the ‘Embed Interop Types’ property to false.
CS8712Error‘{0}’: abstract event cannot use event accessor syntax
CS8714WarningThe 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.
CS8715ErrorDuplicate null suppression operator (‘!’)
CS8716ErrorThere is no target type for the default literal.
CS8750ErrorType ‘{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.
CS8751ErrorInternal error in the C# compiler.
CS8752ErrorThe type ‘{0}’ may not be used as the target type of new()
CS8753ErrorUse of new() is not valid in this context
CS8754ErrorThere is no target type for ‘{0}’
CS8755Error‘{0}’ cannot be used as a modifier on a function pointer parameter.
CS8756ErrorFunction pointer ‘{0}’ does not take {1} arguments
CS8757ErrorNo overload for ‘{0}’ matches function pointer ‘{1}’
CS8758ErrorRef mismatch between ‘{0}’ and function pointer ‘{1}’
CS8759ErrorCannot create a function pointer for ‘{0}’ because it is not a static method
CS8760Error‘{0}’: extern event cannot have initializer
CS8761ErrorOperator ‘{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
CS8762WarningParameter ‘{0}’ must have a non-null value when exiting with ‘{1}’.
CS8763WarningA method marked [DoesNotReturn] should not return.
CS8764WarningNullability of return type doesn’t match overridden member (possibly because of nullability attributes).
CS8765WarningNullability of type of parameter ‘{0}’ doesn’t match overridden member (possibly because of nullability attributes).
CS8766WarningNullability of reference types in return type of ‘{0}’ doesn’t match implicitly implemented member ‘{1}’ (possibly because of nullability attributes).
CS8767WarningNullability of reference types in type of parameter ‘{0}’ of ‘{1}’ doesn’t match implicitly implemented member ‘{2}’ (possibly because of nullability attributes).
CS8768WarningNullability of reference types in return type doesn’t match implemented member ‘{0}’ (possibly because of nullability attributes).
CS8769WarningNullability of reference types in type of parameter ‘{0}’ doesn’t match implemented member ‘{1}’ (possibly because of nullability attributes).
CS8770WarningMethod ‘{0}’ lacks [DoesNotReturn] annotation to match implemented or overridden member.
CS8771ErrorOutput directory could not be determined
CS8772Errorstdin argument ‘-‘ is specified, but input has not been redirected from the standard input stream.
CS8773ErrorFeature ‘{0}’ is not available in C# 9.0. Please use language version {1} or greater.
CS8774WarningMember ‘{0}’ must have a non-null value when exiting.
CS8775WarningMember ‘{0}’ must have a non-null value when exiting with ‘{1}’.
CS8776WarningMember ‘{0}’ cannot be used in this attribute.
CS8777WarningParameter ‘{0}’ must have a non-null value when exiting.
CS8778WarningConstant value ‘{0}’ may overflow ‘{1}’ at runtime (use ‘unchecked’ syntax to override)
CS8779Error‘{0}’ is already listed in the interface list on type ‘{2}’ as ‘{1}’.
CS8780ErrorA variable may not be declared within a ‘not’ or ‘or’ pattern.
CS8781ErrorRelational patterns may not be used for a value of type ‘{0}’.
CS8782ErrorRelational patterns may not be used for a floating-point NaN.
CS8783ErrorLocal function ‘{0}’ must be ‘static’ in order to use the Conditional attribute
CS8784WarningGenerator ‘{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}’
CS8785WarningGenerator ‘{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}’
CS8786ErrorCalling convention of ‘{0}’ is not compatible with ‘{1}’.
CS8787ErrorCannot convert method group to function pointer (Are you missing a ‘&’?)
CS8788ErrorCannot use an extension method with a receiver as the target of a ‘&’ operator.
CS8789ErrorThe type of a local declared in a fixed statement cannot be a function pointer type.
CS8790ErrorAn expression tree may not contain a pattern System.Index or System.Range indexer access
CS8791ErrorAn expression tree may not contain a from-end index (‘^’) expression.
CS8792ErrorAn expression tree may not contain a range (‘..’) expression.
CS8793WarningThe given expression always matches the provided pattern.
CS8794WarningAn expression of type ‘{0}’ always matches the provided pattern.
CS8795ErrorPartial method ‘{0}’ must have an implementation part because it has accessibility modifiers.
CS8796ErrorPartial method ‘{0}’ must have accessibility modifiers because it has a non-void return type.
CS8797ErrorPartial method ‘{0}’ must have accessibility modifiers because it has ‘out’ parameters.
CS8798ErrorPartial method ‘{0}’ must have accessibility modifiers because it has a ‘virtual’, ‘override’, ‘sealed’, ‘new’, or ‘extern’ modifier.
CS8799ErrorBoth partial method declarations must have identical accessibility modifiers.
CS8800ErrorBoth partial method declarations must have identical combinations of ‘virtual’, ‘override’, ‘sealed’, and ‘new’ modifiers.
CS8801ErrorCannot use local variable or local function ‘{0}’ declared in a top-level statement in this context.
CS8802ErrorOnly one compilation unit can have top-level statements.
CS8803ErrorTop-level statements must precede namespace and type declarations.
CS8804ErrorCannot specify /main if there is a compilation unit with top-level statements.
CS8805ErrorProgram using top-level statements must be an executable.
CS8806ErrorThe calling convention of ‘{0}’ is not supported by the language.
CS8807Error‘{0}’ is not a valid calling convention specifier for a function pointer.
CS8808Error‘{0}’ is not a valid function pointer return type modifier. Valid modifiers are ‘ref’ and ‘ref readonly’.
CS8809ErrorA return type can only have one ‘{0}’ modifier.
CS8810Error‘&’ on method groups cannot be used in expression trees
CS8811ErrorCannot convert &method group ‘{0}’ to delegate type ‘{1}’.
CS8812ErrorCannot convert &method group ‘{0}’ to non-function pointer type ‘{1}’.
CS8813ErrorA module initializer must be an ordinary member method
CS8814ErrorModule initializer method ‘{0}’ must be accessible at the module level
CS8815ErrorModule initializer method ‘{0}’ must be static, and non-virtual, must have no parameters, and must return ‘void’
CS8816ErrorModule initializer method ‘{0}’ must not be generic and must not be contained in a generic type
CS8817ErrorBoth partial method declarations must have the same return type.
CS8818ErrorPartial method declarations must have matching ref return values.
CS8819WarningNullability of reference types in return type doesn’t match partial method declaration.
CS8820ErrorA static anonymous function cannot contain a reference to ‘{0}’.
CS8821ErrorA static anonymous function cannot contain a reference to ‘this’ or ‘base’.
CS8822ErrorMethod ‘{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.
CS8823ErrorThe ‘default’ constraint is valid on override and explicit interface implementation methods only.
CS8824WarningParameter ‘{0}’ must have a non-null value when exiting because parameter ‘{1}’ is non-null.
CS8825WarningReturn value must be non-null because parameter ‘{0}’ is non-null.
CS8826WarningPartial method declarations ‘{0}’ and ‘{1}’ have signature differences.
CS8830Error‘{0}’: Target runtime doesn’t support covariant return types in overrides. Return type must be ‘{2}’ to match overridden member ‘{1}’
CS8831Error‘{0}’: Target runtime doesn’t support covariant types in overrides. Type must be ‘{2}’ to match overridden member ‘{1}’
CS8846WarningThe 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.
CS8847WarningThe 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.
CS8848WarningOperator ‘{0}’ cannot be used here due to precedence. Use parentheses to disambiguate.
CS8849ErrorAn expression tree may not contain a with-expression.
CS8850WarningThe assembly ‘{0}’ containing type ‘{1}’ references .NET Framework, which is not supported.
CS8851Warning‘{0}’ defines ‘Equals’ but not ‘GetHashCode’
CS8852ErrorInit-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.
CS8853Error‘{0}’ must match by init-only of overridden member ‘{1}’
CS8854Error‘{0}’ does not implement interface member ‘{1}’. ‘{2}’ cannot implement ‘{1}’.
CS8855ErrorAccessors ‘{0}’ and ‘{1}’ should both be init-only or neither
CS8856ErrorThe ‘init’ accessor is not valid on static members
CS8857ErrorThe receiver of a with expression must have a non-void type.
CS8858ErrorThe receiver type ‘{0}’ is not a valid record type and is not a struct type.
CS8859ErrorMembers named ‘Clone’ are disallowed in records.
CS8860WarningTypes and aliases should not be named ‘record’.
CS8861ErrorUnexpected argument list.
CS8862ErrorA constructor declared in a record with parameter list must have ‘this’ constructor initializer.
CS8863ErrorOnly a single record partial declaration may have a parameter list
CS8864ErrorRecords may only inherit from object or another record
CS8865ErrorOnly records may inherit from records.
CS8866ErrorRecord member ‘{0}’ must be a readable instance property or field of type ‘{1}’ to match positional parameter ‘{2}’.
CS8867ErrorNo accessible copy constructor found in base type ‘{0}’.
CS8868ErrorA copy constructor in a record must call a copy constructor of the base, or a parameterless object constructor if the record inherits from object.
CS8869Error‘{0}’ does not override expected method from ‘object’.
CS8870Error‘{0}’ cannot be sealed because containing record is not sealed.
CS8871Error‘{0}’ does not override expected method from ‘{1}’.
CS8872Error‘{0}’ must allow overriding because the containing record is not sealed.
CS8873ErrorRecord member ‘{0}’ must be public.
CS8874ErrorRecord member ‘{0}’ must return ‘{1}’.
CS8875ErrorRecord member ‘{0}’ must be protected.
CS8876Error‘{0}’ does not override expected property from ‘{1}’.
CS8877ErrorRecord member ‘{0}’ may not be static.
CS8878ErrorA copy constructor ‘{0}’ must be public or protected because the record is not sealed.
CS8879ErrorRecord member ‘{0}’ must be private.
CS8880WarningAuto-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.
CS8881WarningField ‘{0}’ must be fully assigned before control is returned to the caller. Consider updating to language version ‘{1}’ to auto-default the field.
CS8882WarningThe out parameter ‘{0}’ must be assigned to before control leaves the current method
CS8883WarningUse of possibly unassigned auto-implemented property ‘{0}’
CS8884WarningUse of possibly unassigned field ‘{0}’
CS8885WarningThe ‘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.
CS8886WarningUse of unassigned out parameter ‘{0}’
CS8887WarningUse of unassigned local variable ‘{0}’
CS8888Error‘managed’ calling convention cannot be combined with unmanaged calling convention specifiers.
CS8889ErrorThe target runtime doesn’t support extensible or runtime-environment default calling conventions.
CS8890ErrorType ‘{0}’ is not defined.
CS8891ErrorType ‘{0}’ must be public to be used as a calling convention.
CS8892WarningMethod ‘{0}’ will not be used as an entry point because a synchronous entry point ‘{1}’ was found.
CS8893Error‘{0}’ is not a valid calling convention type for ‘UnmanagedCallersOnly’.
CS8894ErrorCannot use ‘{0}’ as a {1} type on a method attributed with ‘UnmanagedCallersOnly’.
CS8895ErrorMethods attributed with ‘UnmanagedCallersOnly’ cannot have generic type parameters and cannot be declared in a generic type.
CS8896Error‘UnmanagedCallersOnly’ can only be applied to ordinary static non-abstract, non-virtual methods or static local functions.
CS8897Warning‘{0}’: static types cannot be used as parameters
CS8898Warning‘{0}’: static types cannot be used as return types
CS8899ErrorApplication entry points cannot be attributed with ‘UnmanagedCallersOnly’.
CS8900ErrorModule initializer cannot be attributed with ‘UnmanagedCallersOnly’.
CS8901Error‘{0}’ is attributed with ‘UnmanagedCallersOnly’ and cannot be called directly. Obtain a function pointer to this method.
CS8902Error‘{0}’ is attributed with ‘UnmanagedCallersOnly’ and cannot be converted to a delegate type. Obtain a function pointer to this method.
CS8903Error‘init’ accessors cannot be marked ‘readonly’. Mark ‘{0}’ readonly instead.
CS8904ErrorInvalid variance: The type parameter ‘{1}’ must be {3} valid on ‘{0}’ unless language version ‘{4}’ or greater is used. ‘{1}’ is {2}.
CS8905ErrorA function pointer cannot be called with named arguments.
CS8906ErrorRecord equality contract property ‘{0}’ must have a get accessor.
CS8907WarningParameter ‘{0}’ is unread. Did you forget to use it to initialize the property with that name?
CS8908ErrorThe type ‘{0}’ may not be used for a field of a record.
CS8909WarningComparison of function pointers might yield an unexpected result, since pointers to the same function may be distinct.
CS8910ErrorThe primary constructor conflicts with the synthesized copy constructor.
CS8911ErrorUsing a function pointer type in a ‘typeof’ in an attribute is not supported.
CS8912ErrorInheriting from a record with a sealed ‘Object.ToString’ is not supported in C# {0}. Please use language version ‘{1}’ or greater.
CS8913ErrorThe positional member ‘{0}’ found corresponding to this parameter is hidden.
CS8914ErrorA global using directive cannot be used in a namespace declaration.
CS8915ErrorA global using directive must precede all non-global using directives.
CS8916ErrorAttributes on lambda expressions require a parenthesized parameter list.
CS8917ErrorThe delegate type could not be inferred.
CS8918ErrorIdentifier or a simple member access expected.
CS8919ErrorTarget runtime doesn’t support static abstract members in interfaces.
CS8920ErrorThe interface ‘{0}’ cannot be used as type argument. Static member ‘{1}’ does not have a most specific implementation in the interface.
CS8921ErrorThe parameter of a unary operator must be the containing type, or its type parameter constrained to it.
CS8922ErrorThe parameter type for ++ or — operator must be the containing type, or its type parameter constrained to it.
CS8923ErrorThe 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.
CS8924ErrorOne of the parameters of a binary operator must be the containing type, or its type parameter constrained to it.
CS8925ErrorThe first operand of an overloaded shift operator must have the same type as the containing type or its type parameter constrained to it
CS8926ErrorA static virtual or abstract interface member can be accessed only on a type parameter.
CS8927ErrorAn expression tree may not contain an access of static virtual or abstract interface member
CS8928Error‘{0}’ does not implement static interface member ‘{1}’. ‘{2}’ cannot implement the interface member because it is not static.
CS8929Error‘{0}’ cannot implement interface member ‘{1}’ in type ‘{2}’ because the target runtime doesn’t support static abstract members in interfaces.
CS8930ErrorExplicit implementation of a user-defined operator ‘{0}’ must be declared static
CS8931ErrorUser-defined conversion in an interface must convert to or from a type parameter on the enclosing type constrained to the enclosing type
CS8932Error‘UnmanagedCallersOnly’ method ‘{0}’ cannot implement interface member ‘{1}’ in type ‘{2}’
CS8933HiddenThe using directive for ‘{0}’ appeared previously as global using
CS8934ErrorCannot convert {0} to type ‘{1}’ because the return type does not match the delegate return type
CS8935ErrorThe AsyncMethodBuilder attribute is disallowed on anonymous methods without an explicit return type.
CS8936ErrorFeature ‘{0}’ is not available in C# 10.0. Please use language version {1} or greater.
CS8937ErrorAt least one top-level statement must be non-empty.
CS8938ErrorThe #line directive value is missing or out of range
CS8939ErrorThe #line directive end position must be greater than or equal to the start position
CS8940ErrorA 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.
CS8941ErrorInterpolated string handler method ‘{0}’ is malformed. It does not return ‘void’ or ‘bool’.
CS8942ErrorInterpolated string handler method ‘{0}’ has inconsistent return type. Expected to return ‘{1}’.
CS8943Errornull is not a valid parameter name. To get access to the receiver of an instance method, use the empty string as the parameter name.
CS8944Error‘{0}’ is not an instance method, the receiver cannot be an interpolated string handler argument.
CS8945Error‘{0}’ is not a valid parameter name from ‘{1}’.
CS8946Error‘{0}’ is not an interpolated string handler type.
CS8947WarningParameter ‘{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.
CS8948ErrorInterpolatedStringHandlerArgumentAttribute arguments cannot refer to the parameter the attribute is used on.
CS8949ErrorThe InterpolatedStringHandlerArgumentAttribute applied to parameter ‘{0}’ is malformed and cannot be interpreted. Construct an instance of ‘{1}’ manually.
CS8950ErrorParameter ‘{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}’.
CS8951ErrorParameter ‘{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}’.
CS8952ErrorAn expression tree may not contain an interpolated string handler conversion.
CS8953ErrorAn interpolated string handler construction cannot use dynamic. Manually construct an instance of ‘{0}’.
CS8954ErrorSource file can only contain one file-scoped namespace declaration.
CS8955ErrorSource file can not contain both file-scoped and normal namespace declarations.
CS8956ErrorFile-scoped namespace must precede all other members in a file.
CS8957ErrorConditional 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.
CS8958ErrorThe parameterless struct constructor must be ‘public’.
CS8959ErrorCallerArgumentExpressionAttribute cannot be applied because there are no standard conversions from type ‘{0}’ to type ‘{1}’
CS8960WarningThe CallerArgumentExpressionAttribute applied to parameter ‘{0}’ will have no effect. It is overridden by the CallerLineNumberAttribute.
CS8961WarningThe CallerArgumentExpressionAttribute applied to parameter ‘{0}’ will have no effect. It is overridden by the CallerFilePathAttribute.
CS8962WarningThe CallerArgumentExpressionAttribute applied to parameter ‘{0}’ will have no effect. It is overridden by the CallerMemberNameAttribute.
CS8963WarningThe CallerArgumentExpressionAttribute applied to parameter ‘{0}’ will have no effect. It is applied with an invalid parameter name.
CS8964ErrorThe CallerArgumentExpressionAttribute may only be applied to parameters with default values
CS8965WarningThe CallerArgumentExpressionAttribute applied to parameter ‘{0}’ will have no effect because it’s self-referential.
CS8966WarningThe 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
CS8967ErrorNewlines inside a non-verbatim interpolated string are not supported in C# {0}. Please use language version {1} or greater.
CS8968Error‘{0}’: an attribute type argument cannot use type parameters
CS8970ErrorType ‘{0}’ cannot be used in this context because it cannot be represented in metadata.
CS8971WarningInterpolatedStringHandlerArgument has no effect when applied to lambda parameters and will be ignored at the call site.
CS8972ErrorA lambda expression with attributes cannot be converted to an expression tree
CS8973WarningThe operation may overflow ‘{0}’ at runtime (use ‘unchecked’ syntax to override)
CS8974WarningConverting method group ‘{0}’ to non-delegate type ‘{1}’. Did you intend to invoke the method?
CS8975ErrorThe contextual keyword ‘var’ cannot be used as an explicit lambda return type
CS8976ErrorInterpolated string handler conversions that reference the instance being indexed cannot be used in indexer member initializers.
CS8977ErrorCannot use ‘ref’, ‘in’, or ‘out’ in the signature of a method attributed with ‘UnmanagedCallersOnly’.
CS8978Error‘{0}’ cannot be made nullable.
CS8979ErrorList patterns may not be used for a value of type ‘{0}’.
CS8980ErrorSlice patterns may only be used once and directly inside a list pattern.
CS8981WarningThe type name ‘{0}’ only contains lower-cased ascii characters. Such names may become reserved for the language.
CS8982ErrorA constructor declared in a ‘record struct’ with parameter list must have a ‘this’ initializer that calls the primary constructor or an explicitly declared constructor.
CS8983ErrorA ‘struct’ with field initializers must include an explicitly declared constructor.
CS8984ErrorCannot update because an inferred delegate type has changed.
CS8985ErrorList patterns may not be used for a value of type ‘{0}’. No suitable ‘Length’ or ‘Count’ property was found.
CS8986ErrorThe ‘scoped’ modifier of parameter ‘{0}’ doesn’t match target ‘{1}’.
CS8987ErrorThe ‘scoped’ modifier of parameter ‘{0}’ doesn’t match overridden or implemented member.
CS8988ErrorThe ‘scoped’ modifier of parameter ‘{0}’ doesn’t match partial method declaration.
CS8989ErrorThe ‘parameter null-checking’ feature is not supported.
CS8996ErrorRaw string literals are not allowed in preprocessor directives.
CS8997ErrorUnterminated raw string literal.
CS8998ErrorThe raw string literal does not start with enough quote characters to allow this many consecutive quote characters as content.
CS8999ErrorLine does not start with the same whitespace as the closing line of the raw string literal.
CS9000ErrorRaw string literal delimiter must be on its own line.

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

C# Compiler Error CS0442 – ‘Property’: abstract properties cannot have private accessors Reason for the Error You’ll get this error...
This is a really simple one . Below is a simple example of an enum called “Designation” defined with the...
This blog post explain the usage of the Checked Block in .NET and how you can use them in Visual...