In this post, you’ll learn all the C# compiler error and warnings from the code CS0001 to CS0500.
C# Compiler Error Codes CS0001 to CS0500
Error Code | Type | Error/Warning Description |
---|---|---|
CS0006 | Error | Metadata file ‘{0}’ could not be found |
CS0009 | Fatal | Metadata file ‘{0}’ could not be opened — {1} |
CS0012 | Error | The type ‘{0}’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘{1}’. |
CS0016 | Error | Could not write to output file ‘{0}’ — ‘{1}’ |
CS0017 | Error | Program has more than one entry point defined. Compile with /main to specify the type that contains the entry point. |
CS0019 | Error | Operator ‘{0}’ cannot be applied to operands of type ‘{1}’ and ‘{2}’ |
CS0020 | Error | Division by constant zero |
CS0021 | Error | Cannot apply indexing with [] to an expression of type ‘{0}’ |
CS0022 | Error | Wrong number of indices inside []; expected {0} |
CS0023 | Error | Operator ‘{0}’ cannot be applied to operand of type ‘{1}’ |
CS0026 | Error | Keyword ‘this’ is not valid in a static property, static method, or static field initializer |
CS0027 | Error | Keyword ‘this’ is not available in the current context |
CS0028 | Warning | ‘{0}’ has the wrong signature to be an entry point |
CS0029 | Error | Cannot implicitly convert type ‘{0}’ to ‘{1}’ |
CS0030 | Error | Cannot convert type ‘{0}’ to ‘{1}’ |
CS0031 | Error | Constant value ‘{0}’ cannot be converted to a ‘{1}’ |
CS0034 | Error | Operator ‘{0}’ is ambiguous on operands of type ‘{1}’ and ‘{2}’ |
CS0035 | Error | Operator ‘{0}’ is ambiguous on an operand of type ‘{1}’ |
CS0036 | Error | An out parameter cannot have the In attribute |
CS0037 | Error | Cannot convert null to ‘{0}’ because it is a non-nullable value type |
CS0039 | Error | Cannot convert type ‘{0}’ to ‘{1}’ via a reference conversion, boxing conversion, unboxing conversion, wrapping conversion, or null type conversion |
CS0041 | Fatal | Unexpected error writing debug information — ‘{0}’ |
CS0050 | Error | Inconsistent accessibility: return type ‘{1}’ is less accessible than method ‘{0}’ |
CS0051 | Error | Inconsistent accessibility: parameter type ‘{1}’ is less accessible than method ‘{0}’ |
CS0052 | Error | Inconsistent accessibility: field type ‘{1}’ is less accessible than field ‘{0}’ |
CS0053 | Error | Inconsistent accessibility: property type ‘{1}’ is less accessible than property ‘{0}’ |
CS0054 | Error | Inconsistent accessibility: indexer return type ‘{1}’ is less accessible than indexer ‘{0}’ |
CS0055 | Error | Inconsistent accessibility: parameter type ‘{1}’ is less accessible than indexer ‘{0}’ |
CS0056 | Error | Inconsistent accessibility: return type ‘{1}’ is less accessible than operator ‘{0}’ |
CS0057 | Error | Inconsistent accessibility: parameter type ‘{1}’ is less accessible than operator ‘{0}’ |
CS0058 | Error | Inconsistent accessibility: return type ‘{1}’ is less accessible than delegate ‘{0}’ |
CS0059 | Error | Inconsistent accessibility: parameter type ‘{1}’ is less accessible than delegate ‘{0}’ |
CS0060 | Error | Inconsistent accessibility: base class ‘{1}’ is less accessible than class ‘{0}’ |
CS0061 | Error | Inconsistent accessibility: base interface ‘{1}’ is less accessible than interface ‘{0}’ |
CS0065 | Error | ‘{0}’: event property must have both add and remove accessors |
CS0066 | Error | ‘{0}’: event must be of a delegate type |
CS0067 | Warning | The event ‘{0}’ is never used |
CS0068 | Error | ‘{0}’: instance event in interface cannot have initializer |
CS0070 | Error | The event ‘{0}’ can only appear on the left hand side of += or -= (except when used from within the type ‘{1}’) |
CS0071 | Error | An explicit interface implementation of an event must use event accessor syntax |
CS0072 | Error | ‘{0}’: cannot override; ‘{1}’ is not an event |
CS0073 | Error | An add or remove accessor must have a body |
CS0074 | Error | ‘{0}’: abstract event cannot have initializer |
CS0075 | Error | To cast a negative value, you must enclose the value in parentheses. |
CS0076 | Error | The enumerator name ‘{0}’ is reserved and cannot be used |
CS0077 | Error | The as operator must be used with a reference type or nullable type (‘{0}’ is a non-nullable value type) |
CS0078 | Warning | The ‘l’ suffix is easily confused with the digit ‘1’ — use ‘L’ for clarity |
CS0079 | Error | The event ‘{0}’ can only appear on the left hand side of += or -= |
CS0080 | Error | Constraints are not allowed on non-generic declarations |
CS0081 | Error | Type parameter declaration must be an identifier not a type |
CS0082 | Error | Type ‘{1}’ already reserves a member called ‘{0}’ with the same parameter types |
CS0100 | Error | The parameter name ‘{0}’ is a duplicate |
CS0101 | Error | The namespace ‘{1}’ already contains a definition for ‘{0}’ |
CS0102 | Error | The type ‘{0}’ already contains a definition for ‘{1}’ |
CS0103 | Error | The name ‘{0}’ does not exist in the current context |
CS0104 | Error | ‘{0}’ is an ambiguous reference between ‘{1}’ and ‘{2}’ |
CS0105 | Warning | The using directive for ‘{0}’ appeared previously in this namespace |
CS0106 | Error | The modifier ‘{0}’ is not valid for this item |
CS0107 | Error | More than one protection modifier |
CS0108 | Warning | ‘{0}’ hides inherited member ‘{1}’. Use the new keyword if hiding was intended. |
CS0109 | Warning | The member ‘{0}’ does not hide an accessible member. The new keyword is not required. |
CS0110 | Error | The evaluation of the constant value for ‘{0}’ involves a circular definition |
CS0111 | Error | Type ‘{1}’ already defines a member called ‘{0}’ with the same parameter types |
CS0112 | Error | A static member cannot be marked as ‘{0}’ |
CS0113 | Error | A member ‘{0}’ marked as override cannot be marked as new or virtual |
CS0114 | Warning | ‘{0}’ hides inherited member ‘{1}’. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword. |
CS0115 | Error | ‘{0}’: no suitable method found to override |
CS0116 | Error | A namespace cannot directly contain members such as fields, methods or statements |
CS0117 | Error | ‘{0}’ does not contain a definition for ‘{1}’ |
CS0118 | Error | ‘{0}’ is a {1} but is used like a {2} |
CS0119 | Error | ‘{0}’ is a {1}, which is not valid in the given context |
CS0120 | Error | An object reference is required for the non-static field, method, or property ‘{0}’ |
CS0121 | Error | The call is ambiguous between the following methods or properties: ‘{0}’ and ‘{1}’ |
CS0122 | Error | ‘{0}’ is inaccessible due to its protection level |
CS0123 | Error | No overload for ‘{0}’ matches delegate ‘{1}’ |
CS0126 | Error | An object of a type convertible to ‘{0}’ is required |
CS0127 | Error | Since ‘{0}’ returns void, a return keyword must not be followed by an object expression |
CS0128 | Error | A local variable or function named ‘{0}’ is already defined in this scope |
CS0131 | Error | The left-hand side of an assignment must be a variable, property or indexer |
CS0132 | Error | ‘{0}’: a static constructor must be parameterless |
CS0133 | Error | The expression being assigned to ‘{0}’ must be constant |
CS0134 | Error | ‘{0}’ is of type ‘{1}’. A const field of a reference type other than string can only be initialized with null. |
CS0136 | Error | A local or parameter named ‘{0}’ cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter |
CS0138 | Error | A ‘using namespace’ directive can only be applied to namespaces; ‘{0}’ is a type not a namespace. Consider a ‘using static’ directive instead |
CS0139 | Error | No enclosing loop out of which to break or continue |
CS0140 | Error | The label ‘{0}’ is a duplicate |
CS0143 | Error | The type ‘{0}’ has no constructors defined |
CS0144 | Error | Cannot create an instance of the abstract type or interface ‘{0}’ |
CS0145 | Error | A const field requires a value to be provided |
CS0146 | Error | Circular base type dependency involving ‘{0}’ and ‘{1}’ |
CS0148 | Error | The delegate ‘{0}’ does not have a valid constructor |
CS0149 | Error | Method name expected |
CS0150 | Error | A constant value is expected |
CS0151 | Error | A switch expression or case label must be a bool, char, string, integral, enum, or corresponding nullable type in C# 6 and earlier. |
CS0152 | Error | The switch statement contains multiple cases with the label value ‘{0}’ |
CS0153 | Error | A goto case is only valid inside a switch statement |
CS0154 | Error | The property or indexer ‘{0}’ cannot be used in this context because it lacks the get accessor |
CS0155 | Error | The type caught or thrown must be derived from System.Exception |
CS0156 | Error | A throw statement with no arguments is not allowed outside of a catch clause |
CS0157 | Error | Control cannot leave the body of a finally clause |
CS0158 | Error | The label ‘{0}’ shadows another label by the same name in a contained scope |
CS0159 | Error | No such label ‘{0}’ within the scope of the goto statement |
CS0160 | Error | A previous catch clause already catches all exceptions of this or of a super type (‘{0}’) |
CS0161 | Error | ‘{0}’: not all code paths return a value |
CS0162 | Warning | Unreachable code detected |
CS0163 | Error | Control cannot fall through from one case label (‘{0}’) to another |
CS0164 | Warning | This label has not been referenced |
CS0165 | Error | Use of unassigned local variable ‘{0}’ |
CS0168 | Warning | The variable ‘{0}’ is declared but never used |
CS0169 | Warning | The field ‘{0}’ is never used |
CS0170 | Error | Use of possibly unassigned field ‘{0}’ |
CS0171 | Error | Field ‘{0}’ must be fully assigned before control is returned to the caller. Consider updating to language version ‘{1}’ to auto-default the field. |
CS0172 | Error | Type of conditional expression cannot be determined because ‘{0}’ and ‘{1}’ implicitly convert to one another |
CS0173 | Error | Type of conditional expression cannot be determined because there is no implicit conversion between ‘{0}’ and ‘{1}’ |
CS0174 | Error | A base class is required for a ‘base’ reference |
CS0175 | Error | Use of keyword ‘base’ is not valid in this context |
CS0176 | Error | Member ‘{0}’ cannot be accessed with an instance reference; qualify it with a type name instead |
CS0177 | Error | The out parameter ‘{0}’ must be assigned to before control leaves the current method |
CS0178 | Error | Invalid rank specifier: expected ‘,’ or ‘]’ |
CS0179 | Error | ‘{0}’ cannot be extern and declare a body |
CS0180 | Error | ‘{0}’ cannot be both extern and abstract |
CS0181 | Error | Attribute constructor parameter ‘{0}’ has type ‘{1}’, which is not a valid attribute parameter type |
CS0182 | Error | An attribute argument must be a constant expression, typeof expression or array creation expression of an attribute parameter type |
CS0183 | Warning | The given expression is always of the provided (‘{0}’) type |
CS0184 | Warning | The given expression is never of the provided (‘{0}’) type |
CS0185 | Error | ‘{0}’ is not a reference type as required by the lock statement |
CS0186 | Error | Use of null is not valid in this context |
CS0188 | Error | 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. |
CS0190 | Error | The __arglist construct is valid only within a variable argument method |
CS0191 | Error | A readonly field cannot be assigned to (except in a constructor or init-only setter of the type in which the field is defined or a variable initializer) |
CS0192 | Error | A readonly field cannot be used as a ref or out value (except in a constructor) |
CS0193 | Error | The * or -> operator must be applied to a pointer |
CS0196 | Error | A pointer must be indexed by only one value |
CS0197 | Warning | Using ‘{0}’ as a ref or out value or taking its address may cause a runtime exception because it is a field of a marshal-by-reference class |
CS0198 | Error | A static readonly field cannot be assigned to (except in a static constructor or a variable initializer) |
CS0199 | Error | A static readonly field cannot be used as a ref or out value (except in a static constructor) |
CS0200 | Error | Property or indexer ‘{0}’ cannot be assigned to — it is read only |
CS0201 | Error | Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement |
CS0202 | Error | foreach requires that the return type ‘{0}’ of ‘{1}’ must have a suitable public ‘MoveNext’ method and public ‘Current’ property |
CS0204 | Error | Only 65534 locals, including those generated by the compiler, are allowed |
CS0205 | Error | Cannot call an abstract base member: ‘{0}’ |
CS0206 | Error | A property or indexer may not be passed as an out or ref parameter |
CS0208 | Error | Cannot take the address of, get the size of, or declare a pointer to a managed type (‘{0}’) |
CS0209 | Error | The type of a local declared in a fixed statement must be a pointer type |
CS0210 | Error | You must provide an initializer in a fixed or using statement declaration |
CS0211 | Error | Cannot take the address of the given expression |
CS0212 | Error | You can only take the address of an unfixed expression inside of a fixed statement initializer |
CS0213 | Error | You cannot use the fixed statement to take the address of an already fixed expression |
CS0214 | Error | Pointers and fixed size buffers may only be used in an unsafe context |
CS0215 | Error | The return type of operator True or False must be bool |
CS0216 | Error | The operator ‘{0}’ requires a matching operator ‘{1}’ to also be defined |
CS0217 | Error | In order to be applicable as a short circuit operator a user-defined logical operator (‘{0}’) must have the same return type and parameter types |
CS0218 | Error | In order for ‘{0}’ to be applicable as a short circuit operator, its declaring type ‘{1}’ must define operator true and operator false |
CS0219 | Warning | The variable ‘{0}’ is assigned but its value is never used |
CS0220 | Error | The operation overflows at compile time in checked mode |
CS0221 | Error | Constant value ‘{0}’ cannot be converted to a ‘{1}’ (use ‘unchecked’ syntax to override) |
CS0224 | Error | A method with vararg cannot be generic, be in a generic type, or have a params parameter |
CS0225 | Error | The params parameter must be a single dimensional array |
CS0226 | Error | An __arglist expression may only appear inside of a call or new expression |
CS0227 | Error | Unsafe code may only appear if compiling with /unsafe |
CS0229 | Error | Ambiguity between ‘{0}’ and ‘{1}’ |
CS0230 | Error | Type and identifier are both required in a foreach statement |
CS0231 | Error | A params parameter must be the last parameter in a parameter list |
CS0233 | Error | ‘{0}’ does not have a predefined size, therefore sizeof can only be used in an unsafe context |
CS0234 | Error | The type or namespace name ‘{0}’ does not exist in the namespace ‘{1}’ (are you missing an assembly reference?) |
CS0236 | Error | A field initializer cannot reference the non-static field, method, or property ‘{0}’ |
CS0238 | Error | ‘{0}’ cannot be sealed because it is not an override |
CS0239 | Error | ‘{0}’: cannot override inherited member ‘{1}’ because it is sealed |
CS0242 | Error | The operation in question is undefined on void pointers |
CS0243 | Error | The Conditional attribute is not valid on ‘{0}’ because it is an override method |
CS0244 | Error | Neither ‘is’ nor ‘as’ is valid on pointer types |
CS0245 | Error | Destructors and object.Finalize cannot be called directly. Consider calling IDisposable.Dispose if available. |
CS0246 | Error | The type or namespace name ‘{0}’ could not be found (are you missing a using directive or an assembly reference?) |
CS0247 | Error | Cannot use a negative size with stackalloc |
CS0248 | Error | Cannot create an array with a negative size |
CS0249 | Error | Do not override object.Finalize. Instead, provide a destructor. |
CS0250 | Error | Do not directly call your base type Finalize method. It is called automatically from your destructor. |
CS0251 | Warning | Indexing an array with a negative index (array indices always start at zero) |
CS0252 | Warning | Possible unintended reference comparison; to get a value comparison, cast the left hand side to type ‘{0}’ |
CS0253 | Warning | Possible unintended reference comparison; to get a value comparison, cast the right hand side to type ‘{0}’ |
CS0254 | Error | The right hand side of a fixed statement assignment may not be a cast expression |
CS0255 | Error | stackalloc may not be used in a catch or finally block |
CS0257 | Error | An __arglist parameter must be the last parameter in a parameter list |
CS0260 | Error | Missing partial modifier on declaration of type ‘{0}’; another partial declaration of this type exists |
CS0261 | Error | Partial declarations of ‘{0}’ must be all classes, all record classes, all structs, all record structs, or all interfaces |
CS0262 | Error | Partial declarations of ‘{0}’ have conflicting accessibility modifiers |
CS0263 | Error | Partial declarations of ‘{0}’ must not specify different base classes |
CS0264 | Error | Partial declarations of ‘{0}’ must have the same type parameter names in the same order |
CS0265 | Error | Partial declarations of ‘{0}’ have inconsistent constraints for type parameter ‘{1}’ |
CS0266 | Error | Cannot implicitly convert type ‘{0}’ to ‘{1}’. An explicit conversion exists (are you missing a cast?) |
CS0267 | Error | The ‘partial’ modifier can only appear immediately before ‘class’, ‘record’, ‘struct’, ‘interface’, or a method return type. |
CS0268 | Error | Imported type ‘{0}’ is invalid. It contains a circular base type dependency. |
CS0269 | Error | Use of unassigned out parameter ‘{0}’ |
CS0270 | Error | Array size cannot be specified in a variable declaration (try initializing with a ‘new’ expression) |
CS0271 | Error | The property or indexer ‘{0}’ cannot be used in this context because the get accessor is inaccessible |
CS0272 | Error | The property or indexer ‘{0}’ cannot be used in this context because the set accessor is inaccessible |
CS0273 | Error | The accessibility modifier of the ‘{0}’ accessor must be more restrictive than the property or indexer ‘{1}’ |
CS0274 | Error | Cannot specify accessibility modifiers for both accessors of the property or indexer ‘{0}’ |
CS0276 | Error | ‘{0}’: accessibility modifiers on accessors may only be used if the property or indexer has both a get and a set accessor |
CS0277 | Error | ‘{0}’ does not implement interface member ‘{1}’. ‘{2}’ is not public. |
CS0278 | Warning | ‘{0}’ does not implement the ‘{1}’ pattern. ‘{2}’ is ambiguous with ‘{3}’. |
CS0279 | Warning | ‘{0}’ does not implement the ‘{1}’ pattern. ‘{2}’ is not a public instance or extension method. |
CS0280 | Warning | ‘{0}’ does not implement the ‘{1}’ pattern. ‘{2}’ has the wrong signature. |
CS0281 | Error | Friend access was granted by ‘{0}’, but the public key of the output assembly (‘{1}’) does not match that specified by the InternalsVisibleTo attribute in the granting assembly. |
CS0282 | Warning | There is no defined ordering between fields in multiple declarations of partial struct ‘{0}’. To specify an ordering, all instance fields must be in the same declaration. |
CS0283 | Error | The type ‘{0}’ cannot be declared const |
CS0304 | Error | Cannot create an instance of the variable type ‘{0}’ because it does not have the new() constraint |
CS0305 | Error | Using the generic {1} ‘{0}’ requires {2} type arguments |
CS0306 | Error | The type ‘{0}’ may not be used as a type argument |
CS0307 | Error | The {1} ‘{0}’ cannot be used with type arguments |
CS0308 | Error | The non-generic {1} ‘{0}’ cannot be used with type arguments |
CS0310 | Error | ‘{2}’ must be a non-abstract type with a public parameterless constructor in order to use it as parameter ‘{1}’ in the generic type or method ‘{0}’ |
CS0311 | Error | The type ‘{3}’ cannot be used as type parameter ‘{2}’ in the generic type or method ‘{0}’. There is no implicit reference conversion from ‘{3}’ to ‘{1}’. |
CS0312 | Error | The type ‘{3}’ cannot be used as type parameter ‘{2}’ in the generic type or method ‘{0}’. The nullable type ‘{3}’ does not satisfy the constraint of ‘{1}’. |
CS0313 | Error | The type ‘{3}’ cannot be used as type parameter ‘{2}’ in the generic type or method ‘{0}’. The nullable type ‘{3}’ does not satisfy the constraint of ‘{1}’. Nullable types can not satisfy any interface constraints. |
CS0314 | Error | The type ‘{3}’ cannot be used as type parameter ‘{2}’ in the generic type or method ‘{0}’. There is no boxing conversion or type parameter conversion from ‘{3}’ to ‘{1}’. |
CS0315 | Error | The type ‘{3}’ cannot be used as type parameter ‘{2}’ in the generic type or method ‘{0}’. There is no boxing conversion from ‘{3}’ to ‘{1}’. |
CS0316 | Error | The parameter name ‘{0}’ conflicts with an automatically-generated parameter name |
CS0400 | Error | The type or namespace name ‘{0}’ could not be found in the global namespace (are you missing an assembly reference?) |
CS0401 | Error | The new() constraint must be the last constraint specified |
CS0402 | Warning | ‘{0}’: an entry point cannot be generic or in a generic type |
CS0403 | Error | Cannot convert null to type parameter ‘{0}’ because it could be a non-nullable value type. Consider using ‘default({0})’ instead. |
CS0405 | Error | Duplicate constraint ‘{0}’ for type parameter ‘{1}’ |
CS0406 | Error | The class type constraint ‘{0}’ must come before any other constraints |
CS0407 | Error | ‘{1} {0}’ has the wrong return type |
CS0409 | Error | A constraint clause has already been specified for type parameter ‘{0}’. All of the constraints for a type parameter must be specified in a single where clause. |
CS0411 | Error | The type arguments for method ‘{0}’ cannot be inferred from the usage. Try specifying the type arguments explicitly. |
CS0412 | Error | ‘{0}’: a parameter, local variable, or local function cannot have the same name as a method type parameter |
CS0413 | Error | The type parameter ‘{0}’ cannot be used with the ‘as’ operator because it does not have a class type constraint nor a ‘class’ constraint |
CS0414 | Warning | The field ‘{0}’ is assigned but its value is never used |
CS0415 | Error | The ‘{0}’ attribute is valid only on an indexer that is not an explicit interface member declaration |
CS0416 | Error | ‘{0}’: an attribute argument cannot use type parameters |
CS0417 | Error | ‘{0}’: cannot provide arguments when creating an instance of a variable type |
CS0418 | Error | ‘{0}’: an abstract type cannot be sealed or static |
CS0419 | Warning | Ambiguous reference in cref attribute: ‘{0}’. Assuming ‘{1}’, but could have also matched other overloads including ‘{2}’. |
CS0420 | Warning | ‘{0}’: a reference to a volatile field will not be treated as volatile |
CS0423 | Error | Since ‘{1}’ has the ComImport attribute, ‘{0}’ must be extern or abstract |
CS0424 | Error | ‘{0}’: a class with the ComImport attribute cannot specify a base class |
CS0425 | Error | The constraints for type parameter ‘{0}’ of method ‘{1}’ must match the constraints for type parameter ‘{2}’ of interface method ‘{3}’. Consider using an explicit interface implementation instead. |
CS0426 | Error | The type name ‘{0}’ does not exist in the type ‘{1}’ |
CS0428 | Error | Cannot convert method group ‘{0}’ to non-delegate type ‘{1}’. Did you intend to invoke the method? |
CS0430 | Error | The extern alias ‘{0}’ was not specified in a /reference option |
CS0431 | Error | Cannot use alias ‘{0}’ with ‘::’ since the alias references a type. Use ‘.’ instead. |
CS0432 | Error | Alias ‘{0}’ not found |
CS0433 | Error | The type ‘{1}’ exists in both ‘{0}’ and ‘{2}’ |
CS0434 | Error | The namespace ‘{1}’ in ‘{0}’ conflicts with the type ‘{3}’ in ‘{2}’ |
CS0435 | Warning | The namespace ‘{1}’ in ‘{0}’ conflicts with the imported type ‘{3}’ in ‘{2}’. Using the namespace defined in ‘{0}’. |
CS0436 | Warning | The type ‘{1}’ in ‘{0}’ conflicts with the imported type ‘{3}’ in ‘{2}’. Using the type defined in ‘{0}’. |
CS0437 | Warning | The type ‘{1}’ in ‘{0}’ conflicts with the imported namespace ‘{3}’ in ‘{2}’. Using the type defined in ‘{0}’. |
CS0438 | Error | The type ‘{1}’ in ‘{0}’ conflicts with the namespace ‘{3}’ in ‘{2}’ |
CS0439 | Error | An extern alias declaration must precede all other elements defined in the namespace |
CS0440 | Warning | Defining an alias named ‘global’ is ill-advised since ‘global::’ always references the global namespace and not an alias |
CS0441 | Error | ‘{0}’: a type cannot be both static and sealed |
CS0442 | Error | ‘{0}’: abstract properties cannot have private accessors |
CS0443 | Error | Syntax error; value expected |
CS0445 | Error | Cannot modify the result of an unboxing conversion |
CS0446 | Error | Foreach cannot operate on a ‘{0}’. Did you intend to invoke the ‘{0}’? |
CS0448 | Error | The return type for ++ or — operator must match the parameter type or be derived from the parameter type |
CS0449 | Error | The ‘class’, ‘struct’, ‘unmanaged’, ‘notnull’, and ‘default’ constraints cannot be combined or duplicated, and must be specified first in the constraints list. |
CS0450 | Error | ‘{0}’: cannot specify both a constraint class and the ‘class’ or ‘struct’ constraint |
CS0451 | Error | The ‘new()’ constraint cannot be used with the ‘struct’ constraint |
CS0452 | Error | The type ‘{2}’ must be a reference type in order to use it as parameter ‘{1}’ in the generic type or method ‘{0}’ |
CS0453 | Error | The type ‘{2}’ must be a non-nullable value type in order to use it as parameter ‘{1}’ in the generic type or method ‘{0}’ |
CS0454 | Error | Circular constraint dependency involving ‘{0}’ and ‘{1}’ |
CS0455 | Error | Type parameter ‘{0}’ inherits conflicting constraints ‘{1}’ and ‘{2}’ |
CS0456 | Error | Type parameter ‘{1}’ has the ‘struct’ constraint so ‘{1}’ cannot be used as a constraint for ‘{0}’ |
CS0457 | Error | Ambiguous user defined conversions ‘{0}’ and ‘{1}’ when converting from ‘{2}’ to ‘{3}’ |
CS0458 | Warning | The result of the expression is always ‘null’ of type ‘{0}’ |
CS0460 | Error | Constraints for override and explicit interface implementation methods are inherited from the base method, so they cannot be specified directly, except for either a ‘class’, or a ‘struct’ constraint. |
CS0462 | Error | The inherited members ‘{0}’ and ‘{1}’ have the same signature in type ‘{2}’, so they cannot be overridden |
CS0463 | Error | Evaluation of the decimal constant expression failed |
CS0464 | Warning | Comparing with null of type ‘{0}’ always produces ‘false’ |
CS0465 | Warning | Introducing a ‘Finalize’ method can interfere with destructor invocation. Did you intend to declare a destructor? |
CS0466 | Error | ‘{0}’ should not have a params parameter since ‘{1}’ does not |
CS0469 | Warning | The ‘goto case’ value is not implicitly convertible to type ‘{0}’ |
CS0470 | Error | Method ‘{0}’ cannot implement interface accessor ‘{1}’ for type ‘{2}’. Use an explicit interface implementation. |
CS0472 | Warning | The result of the expression is always ‘{0}’ since a value of type ‘{1}’ is never equal to ‘null’ of type ‘{2}’ |
CS0473 | Warning | Explicit interface implementation ‘{0}’ matches more than one interface member. Which interface member is actually chosen is implementation-dependent. Consider using a non-explicit implementation instead. |
CS0500 | Error | ‘{0}’ cannot declare a body because it is marked abstract |