lenelex.com
Home
Quizzes
Games
Register
Log in
Question 1 of 13
What will be the output of the following code?
string text = "teen", output = ""; foreach (char c in text) { if (!output.Contains(c.ToString())) { output += c; } } Console.Write(output);
A. tn
B. teen
C. ee
D. ten
Links:
The foreach Statement
The Addition Assignment Operator