ConvertAll Error Highlighting

Within a piece of code, I have the following statements:

List test1 = person.MaritalStatuses.ConvertAll( new Converter]]>(ObjectToOrganisationBase));


private OrganisationBase ObjectToOrganisationBase(MaritalStatus input)
{
return input;
}

OrganisationBase is inherited by MaritalStatus.

This code compiles and runs OK in my unit tests but Resharper flags the
method ObjectToOrganisationBase within the ConvertAll statement as
incorrectly defined with the message:
"expected a method with 'OrganisationBase
ObjectToOrganisationBase(MaritalStatus)' signature".

Quesion is, is Resharper correct and VS wrong?

1 comment
Comment actions Permalink

This is a known problem inReSharper.
Will be fixed shortly

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Ed Dargan" <ed.dargan@azul3.co.uk> wrote in message
news:dqi9sp$thc$1@is.intellij.net...

Within a piece of code, I have the following statements:

>

List<OrganisationBase> test1 = person.MaritalStatuses.ConvertAll(
new Converter<MaritalStatus,
OrganisationBase>(ObjectToOrganisationBase));

>
>

private OrganisationBase ObjectToOrganisationBase(MaritalStatus input)
{
return input;
}

>

OrganisationBase is inherited by MaritalStatus.

>

This code compiles and runs OK in my unit tests but Resharper flags the
method ObjectToOrganisationBase within the ConvertAll statement as
incorrectly defined with the message:
"expected a method with 'OrganisationBase
ObjectToOrganisationBase(MaritalStatus)' signature".

>

Quesion is, is Resharper correct and VS wrong?



0

Please sign in to leave a comment.