Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. ## String Operations
  2.  
  3. Use `string.IsNullOrWhiteSpace()`
  4. Instead of `string.IsNullOrEmpty()`
  5.  
  6. Use string interpolation instead concatination
  7. `"%" + searchPolicy.Surname.ToUpper(culture) + "%";`
  8. USE
  9. `$"%{searchPolicy.Surname.ToUpper(culture)}%";`
  10.  
  11. Use Invariant string operations instead specify culture explicitly
  12. `searchPolicy.Name.ToUpper(culture) => searchPolicy.Surname.ToUpperInvariant()`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement