这些警告的原因是将在运行时中执行类型转换。
The reason for these warnings is that a type conversion will be executed in runtime.
CriteriaQuery被传递给一个可执行查询并保留类型信息,这样可以直接访问选择列表的元素,而不需要任何运行时强制类型转换。
CriteriaQuery is transferred to an executable query with its type information preserved so that the elements of the selected list can be accessed without any run-time casting.
在运行时获取图属性,需要强制图对象转换到特定类型,如下例所示。
At runtime, to access a diagram's properties, it's required to cast your instance of a diagram object to a specific type, as the following example demonstrates.
讨论一种可用于转换类型定义的工具,它将COM类型库中的类型定义转换为公共语言运行时程序集中的等效定义。
Discusses the tool you can use to convert the type definitions found within a com type library into equivalent definitions in a common language runtime assembly.
泛型相当有用,因为他们提供强制的编译时类型检查,要求更少的数据类型之间的显式转换,并减少装箱拆箱的操作和运行时类型检查。
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.
泛型相当有用,因为他们提供强制的编译时类型检查,要求更少的数据类型之间的显式转换,并减少装箱拆箱的操作和运行时类型检查。
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.
应用推荐