Froquiz
Home
Quizzes
Job Tracker
Senior Challenge
System Design
Get Certified
Blog
🇬🇧
en
Sign In
Start Quiz
🇬🇧
en
Sign In
Start Quiz
Loading...
Quiz Topics
1
2
3
4
5
6
7
8
9
10
01
/ 10
In C#, which expression uses the correct pattern matching in the if-else structure?
Auto Skip
Report Issue
A.
if (obj is string s) { Console.WriteLine(s); }
B.
if (obj.Equals(typeof(string))) { Console.WriteLine(obj); }
C.
if (obj is string s == true) { Console.WriteLine(s); }
D.
if (obj is string) { Console.WriteLine(obj); }
Previous
Next