Skip to Main Content
Customer Feedback

We love feedback from you on our products and the problems in your daily work that you would like us to solve. Please describe the challenge you're encountering and your desired outcome. Be as detailed as possible.

For technical issues or bugs please head to Support or our Developer Community. You can assign up to 20 votes in total. Thank you for your feedback.

Status explanation: 'Future Consideration' = Continuing to collect further feedback, not planned at this time. 'Investigating' = Prioritized for deeper customer and feasibility investigations ahead of planning development.

Categories Technical
Created by Guest
Created on Mar 11, 2024

Add NotNullWhen attribute to ContentReference.IsNullOrEmpty

As a Developer I would like my static code analysis to understand that ContentReference.IsNullOrEmpty is performing an implicit null check.

I have found that if (!ContentReference.IsNullOrEmpty(someLink)) is false, then my IDE will suggest me to add a null check, because someLink could be null.

If you add the NotNullWhenAttribute to the IsNullOrEmpty method signature, then the static code analyser should understand that your check will not return false if the value is null.