Version Used: Visual Studio 2019 version 16.3
Steps to Reproduce:
using System;
class Program
{
public static int Value;
public static unsafe int Read(IntPtr pointer, int offset)
{
Value = ((int*)pointer)[offset]; // No warning
return ((int*)pointer)[offset];
// ~~~~~~
}
}
Expected Behavior:
IDE0004 is not reported for the cast.
Actual Behavior:
IDE0004 is reported for the cast.
Version Used: Visual Studio 2019 version 16.3
Steps to Reproduce:
Expected Behavior:
IDE0004 is not reported for the cast.
Actual Behavior:
IDE0004 is reported for the cast.