C# compiler error CS1628 with VS2010/C#4

2019-05-10 11:52发布

问题:

This compiler error is listed in the C# compiler errors on MSDN for VS2005 and VS2008, but not for newer versions.

This would make me assume the error is not applicable or fixed for newer versions of the compiler, but this appears to not be the case.

I have also noted the list of compiler errors is substantially less for Visual Studio versions 2010 and above.

Am I correct?

回答1:

This error still happens on VS2012 (and this is due to a conceptual limitation around delegates and ref parameters, not a technological limitation). I'm guessing the documentation just hasn't been updated...