mjc65

Example 1-50. Short-circuiting the AND operator

Jun 23rd, 2020
897
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.14 KB | None | 0 0
  1. public void Process(string input)
  2. {
  3.     bool result = (input != null) && (input.StartsWith("v"));
  4.     // Do something with the result
  5. }
Advertisement
Add Comment
Please, Sign In to add comment