Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use string.IsNullOrEmpty when checking for empty strings #2

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

deepsource-autofix[bot]
Copy link
Contributor

Comparing a string against an empty string literal is valid and is the preferred way in languages such as Go and Python. In C# however, it is recommended that you use the convenience methods such as string.IsNullOrWhiteSpace or string.IsNullOrEmpty as they offer slightly better performance when compared to other traditional/naive implementations.

Comparing a string against an empty string literal is valid and is the preferred way in languages such as Go and Python. In C# however, it is recommended that you use the convenience methods such as `string.IsNullOrWhiteSpace` or `string.IsNullOrEmpty` as they offer slightly better performance when compared to other traditional/naive implementations.
@kran27 kran27 merged commit 2edbece into main Dec 10, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant