← Back to Strings
Question 302
Does It Have an At Sign?
Does It Have an At Sign?
The Contains method checks whether a string includes a smaller piece of text and returns a bool: true if the text is found, false if it is not. You are given a string named email set to "user@example.com". Use Contains to check whether it includes the "@" symbol and print the result. Remember that in C# a printed bool shows as True or False with a capital first letter.Expected Output:
True= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Strings
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.