as operator
The
as operator explicitly converts the result of an expression to a given reference or nullable value type. If the conversion is not possible, the as operator returns null. Unlike a cast expression, the as operator never throws an exception.
The expression of the form
C#
E as T
沒有留言:
張貼留言