🤔

Common compiler errors#

  • CS0101: The namespace 'Foo' already contains a definition for 'Bar'
  • CS0102: The type 'Foo' already contains definition for 'Bar'
  • CS0104: 'reference' is an ambiguous reference between 'X identifier' and 'Y identifier'
  • CS0106: The modifier 'modifier' is not valid for this item
  • CS0116: A namespace cannot directly container members such as fields or methods
  • CS0117: 'Foo' does not contain a definition for 'identifier'
  • CS0119: 'Foo' is a 'Bar', which is not valid in the given context
  • CS0120: An object reference is required for the non-static field, method, or property 'Foo'
  • CS0131: The left-hand side of an assignment must be a variable, property or indexer
  • CS0176: Static member 'Foo' cannot be accessed with an instance reference; qualify it with a type name instead
  • CS0193: The * or -> operator must be applied to a pointer
  • CS0236: A field initializer cannot reference the non-static field, method, or property 'Foo'
  • CS0246: The type or namespace name 'Foo' could not be found (are you missing a using directive or an assembly reference?)
  • CS0266: Cannot implicitly convert type 'Foo' to 'Bar'. An explicit conversion exists (are you missing a cast?)
  • CS0428: The type or namespace name 'Foo' could not be found (are you missing a using directive or an assembly reference?)
  • CS0619: 'Foo' is obsolete: 'Foo has been removed. Use Bar instead.'
  • CS1002: ; expected
  • CS1022: Type or namespace definition, or end-of-file expected
  • CS1061: Type 'Foo' does not contain a definition for 'Bar' and no extension method 'Bar' of type 'Foo' could be found (are you missing a using directive or an assembly reference?)
  • CS1503: Argument 'x' cannot convert from Foo to Bar
  • CS1513: } expected
  • CS1519: Invalid token 'token' in class, struct, or interface member declaration
  • CS1529: A using clause must precede all other elements defined in the namespace except extern alias declarations
  • CS1612: Cannot modify the return value of 'Foo' because it is not a variable
  • CS1624: The body of 'Foo.Bar()' cannot be an iterator block because 'type' is not an iterator interface type
  • CS1644: Feature 'feature' is not part of the C# 4.0 language specification
  • CS8641: 'else' cannot start a statement

Unnamed compiler errors#