csharpier
csharpier copied to clipboard
#if causes line after it to break when it contains an if
When there is this if statement inside of the #if the LogHelper line breaks even though it is not that long.
If the #if contains var x = 1; then LogHelper does not break.
public class ClassName
{
public void MethodName()
{
#if !NET6_0_OR_GREATER
if (true)
{
return;
}
#endif
LogHelper
.ForType(typeof(ErrorHandler))
.Error(message, source);
}
}