C#: String.IsNullOrEmpty vs String.IsNullOrWhiteSpace
🌊 C#: String.IsNullOrEmpty vs String.IsNullOrWhiteSpace 🌊
— Davide Bellone 🐧 (@BelloneDavide) July 20, 2022
What happens to your validation if the user enters a string like " "? That string is made of white spaces, so it is not empty.
Consider using IsNullOrWhiteSpace when validating inputs!#csharp #dotnet pic.twitter.com/s7jSsjCHlh
No comments :
Post a Comment