C Sharp (C#) - Polymorphism and Abstract Classes
What does the
as operator do in C#?as operator do in C#?as operator behavioras operator attempts to cast an object to a specified type but returns null instead of throwing an exception if the cast fails.is operator, It converts a value type to a string representation. is unrelated, and It throws an exception if the cast is invalid. is incorrect because as does not throw exceptions.as returns null on failure [OK]as returns null, no exceptions [OK]as with isas throws exceptionsas works with value types15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions