extension methods: parameter modifier 'ref' cannot be used with 'this'

With ReSharper 4.1.933 you can write the following code without getting an
error from ReSharper:

public static T DeserializeFromBinary]]>(ref this T obj, byte[] data)
{
...
}

but the parameter modifier 'ref' cannot be used with 'this' !!

kind regards
Josef




1 comment

Thank you for the feedback.
I've created bug report for this problem ,and it will be fixed by the next
release

http://www.jetbrains.net/jira/browse/RSRP-79674

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Hahnl Josef" <hahnl@aon.at> wrote in message
news:g9o9tb$8k8$1@is.intellij.net...

With ReSharper 4.1.933 you can write the following code without getting an
error from ReSharper:

>

public static T DeserializeFromBinary<T>(ref this T obj, byte[] data)
{
...
}

>

but the parameter modifier 'ref' cannot be used with 'this' !!

>

kind regards
Josef

>
>
>



0

Please sign in to leave a comment.