views:

1162

answers:

1

This is meant to be a collection of possible C# compiler errors that are not documented.

If you encounter such an error, please post an answer here listing:

  • The error number (CSnnnn)
  • The associated error message
  • If possible, a small snippet of code that will produce the error

Example:

CS0224:

A method with vararg cannot be generic, be in a generic type, or have a params parameter

Produced by:

int Foo<T>(__arglist) { return 0; }

If someone has already posted an answer listing the error you encountered, then edit that answer to add additional details.

The list of documented errors can be found on MSDN. There seem to be quite a few missing...

+2  A: 

CS1669:

__arglist is not valid in this context

Produced by:

delegate int Bar(__arglist);
leppie
I am not sure why this construct is not allowed. When crafting the intention in IL, this delegate can be consumed without issues in C#. (VS is another story).
leppie