[588] Wrong Error Message Display from ReSharper

Hi Folks,


No Error Display with explicit generic type on ConvertAll()

public static string JoinList(List list) { if (list == null) { throw new ArgumentNullException("list"); } return string.Join(",", list.ConvertAll(delegate(T input) { return input.ToString(); }).ToArray()); } Wrong Error Display with implicit generic type on ConvertAll() public static string JoinListChristoph(List]]> list) {
if (list == null) {
throw new ArgumentNullException("list");
}
return string.Join(",", list.ConvertAll(delegate(T input) {
return input.ToString(); }).ToArray());
}


Compiles and Works fine!

Regards

Albert

1 comment
Comment actions Permalink

That's because return type inferencing is a C#3.0 feature - you won't be able to build the second example on VS2005. Even if you tell VS2008 to target the 2.0 framework, it's still using the C#3.0 compiler.

Current versions of ReSharper don't support C#3.0.

0

Please sign in to leave a comment.