Use of “as” keyword as for casting in C#

2009-01-06 The keyword as doesn’t throw an exception if it fails to complete the casting operation. Instead it will return null. Other casting operations will throw an exception when the provided value cannot be casted. Since the “as” keyword sets or returns “null” value when it fails, the variable you use must be of aContinue reading “Use of “as” keyword as for casting in C#”