Friendly reminder about C# expression-bodied methods 🙂🙏 #dotnet pic.twitter.com/XnUAnmOdQr
— Dan Clarke 🎙 (@dracan) July 19, 2022
Wednesday, July 20, 2022
C# Expression bodied Method reduce lines of code
C#: String.IsNullOrEmpty vs String.IsNullOrWhiteSpace
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
Subscribe to:
Posts
(
Atom
)