zoukankan      html  css  js  c++  java
  • C#

    

    Checks if an object is compatible with a given type.

    An is expression evaluates to true if the provided expression is non-null, and the provided object can be cast to the provided type without causing an exception to be thrown.

    The is keyword causes a compile-time warning if the expression is known to always be true or to always be false, but typically evaluates type compatibility at run time.

    The is operator cannot be overloaded.

    Note that the is operator only considers reference conversions, boxing conversions, and unboxing conversions. Other conversions, such as user-defined conversions, are not considered.

    Anonymous methods are not allowed on the left side of the is operator. This exception includes lambda expressions.

  • 相关阅读:
    第十四次会议
    第十三次会议
    第十二次会议
    第十一次会议
    第十次会议
    第九次会议
    第八次会议
    第七次会议
    第六次会议
    机器学习
  • 原文地址:https://www.cnblogs.com/yutingliuyl/p/7052733.html
Copyright © 2011-2022 走看看