ReSharper 1.5 and Unsafe
Hi. ReSharper 1.5 doesn't handle unsafe code well; that is, it erroneously marks usage of foo->bar as an error, saying "Method, delegate or event is expected".
Is this being corrected in 2.0?
Please sign in to leave a comment.
Could you post an example so that we are able to ensure that your particular
case works correctly now?
Thanks,
Andrey Simanovsky
In the following code excerpt, the line m_data->IncWarningCount() is flagged by ReSharper 1.5 build 165 as an error, saying ""Method, delegate or event is expected". However, the code compiles and runs without problems.
public unsafe class CompanyStatistics
{
private CompanyStatisticsData* m_data;
public CompanyStatistics(uint addr)
{
m_data = (CompanyStatisticsData*) addr;
}
public void IncWarningCount()
{
if (m_data != null)
m_data->IncWarningCount();
}
...
}
public unsafe struct CompanyStatisticsData
{
public int m_id;
public int m_warningCount;
...
}