All docs
V20.1
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

CRR0013 - The member always returns the same value

This analyzer detects members which return the same value.

public bool Test(bool condition) {
    if (condition)
        return false;
    return false;
}

How to Fix the Issue

Change the method's return statement.

public bool Test(bool condition) {
    if (condition)
        return false;
    return true;
}

How to Enable the Diagnostic

Choose the Member always returns the same value issue in the Editor | Language | Code Analysis | Code Issues Catalog options page and check the Enabled checkbox.

Enable