C Sharp (C#) - Polymorphism and Abstract Classes
Identify the error in this code snippet:
object obj = "hello";
if (obj is int number)
{
Console.WriteLine(number);
}object obj = "hello";
if (obj is int number)
{
Console.WriteLine(number);
}obj is int number is false and number is not assigned.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions