泛型相当有用,因为他们提供强制的编译时类型检查,要求更少的数据类型之间的显式转换,并减少装箱拆箱的操作和运行时类型检查。
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.
当把一个“数据”从值类型转换成引用类型的时候,就叫做“装箱”,反之叫做“拆箱”。
When the data moves from value types to reference types its termed as 'Boxing' and the vice versa is termed as 'UnBoxing'.
当把一个“数据”从值类型转换成引用类型的时候,就叫做“装箱”,反之叫做“拆箱”。
When the data moves from value types to reference types its termed as 'Boxing' and the vice versa is termed as 'UnBoxing'.
应用推荐