Why is IntelliSense showing a star to the left of functions within if statements

To turn it off, disable Visual Studio IntelliCode extension.

Extensions menu -> Installed -> Visual Studio IntelliCode


That's Intellicode at work. Active by default in VS2019 16.1 or later.:

IntelliCode provides AI-assisted IntelliSense in both Visual Studio and Visual Studio Code. IntelliCode suggestions appear at the top of the completion list with a star icon next to them.

The completion list suggests the most likely correct API for a developer to use rather than presenting a simple alphabetical list of members. To provide this dynamic list, IntelliCode uses the developer's current code context as well as patterns based on thousands of highly rated, open-source projects on GitHub. The results form a model that predicts the most likely and most relevant API calls.

(From https://docs.microsoft.com/en-us/visualstudio/intellicode/overview#context-aware-code-completions )

In this specific case, the * IsNullOrEmpty option is the exact same thing as "IsNullOrEmpty". It is simply being highlighted at the top with the star. In longer suggestion lists, the recommended method or property might not be immediately visible (requires scrolling before it comes into view).