V3230. Comparison with 'typeof(Nullable<T>)' is meaningless. Calling 'GetType()' on a nullable variable never returns 'Nullable<T>'.
The analyzer has detected a meaningless comparison between the result of calling the GetType method on a Nullable<T> object and typeof(Nullable<T>). The GetType method always returns the underlying type for values of the Nullable<T> type.
The example:
public void Foo<T>(Nullable<T> value) where T : struct
{
if (value.GetType() == typeof(Nullable<int>))
{
....
}
....
}
In this case, the comparison result is always false, because calling value.GetType() returns the T type.
The fixed code:
public void Foo<T>(Nullable<T> value) where T : struct
{
if (value.GetType() == typeof(int))
{
....
}
....
}