20-07-2012 Use ?? operator to tell the compiler how to assign a null-able variable to a non-null-able variable. Menol ILT
Tag Archives: csharp
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#”