FormatType? requestFormatType = request.AcceptFormat;
if (null != requestFormatType)
{
format = requestFormatType;
}
Right Code
if (null == format)
{
format = request.AcceptFormat;
}
I see that this method has Nullable type parameter format.
I thought you were going to judge if the parameter format was empty, otherwise the code if (null != requestFormatType) would be meaningless. Because it's always true.
Error Code
Right Code
I see that this method has Nullable type parameter
format
. I thought you were going to judge if the parameterformat
was empty, otherwise the codeif (null != requestFormatType)
would be meaningless. Because it's alwaystrue
.