...meClass类结构能在应用程序运行过程中获得该类对象及其基类的相关信息,从而可以实现运行时类型检查(Run Time Type Inspection,RTTI)。
基于8个网页-相关网页
泛型相当有用,因为他们提供强制的编译时类型检查,要求更少的数据类型之间的显式转换,并减少装箱拆箱的操作和运行时类型检查。
Generics are useful because they provide stronger compile-time type checking, require fewer explicit conversions between data types, and reduce the need for boxing operations and run-time type checks.
在运行时检查类型或对象实例的元数据的能力是一个非常强大的功能。
The ability to examine the metadata of a type or object instance at run time is a powerful feature.
现在,如果在运行时作为基类型传递派生的子类,那么无法通过检查接口参数类型识别出子类。
When you now try to pass a derived subclass in terms of a base type at run time, the subclasses will not be recognized by simply introspecting the interface parameter types.
应用推荐