获得字段信息的Class反射调用不同于那些用于接入构造函数的调用,在参数类型数组中使用了字段名。
The Class reflection calls to access field information are similar to those used to access constructors, with a field name used in place of an array of parameter types.
参数数组包含您的绘图选项,这取决于您使用的绘图类型。
The arguments array contains your plot options, which depend on the type of plot you use.
数组括号紧接参数名之后,而非类型之后。
The array brackets come after the argument name instead of after the type.
在C数组逆序的例子中,逆序函数中的参数的类型是double*。
In the example of reversing a C array, the arguments to reverse are clearly of type double*.
GenericTemplate实例包含类的基本类型参数信息,还有为类定义的字段的数组。
The GenericTemplate instance holds the basic type parameter information for the class, along with the array of fields defined for the class.
我在清单6中采取了后一种方法(注意filter使用了一个(t):Boolean方法,意味着使用数组持有的任意类型的参数,并返回一个Boolean)。
I've tried the latter approach in Listing 6. (Note that filter takes a (t) : Booleanmethod, meaning it takes a single parameter of whatever type the array holds and returns a Boolean.)
不要使用列表或数组作为参数或返回值(可以使用数组,不过必须使用稍后在本文中所描述的一种特定数据类型)。
Do not use lists or arrays as parameters or return values (arrays are possible, but you must use a special data type described later in this article).
但是这段代码不能工作——不能实例化用类型参数表示的类型数组。
But this code does not work — you cannot instantiate an array of a type represented by a type parameter.
这个子接口提供了关于数组类型的信息,数组的组件类型可以是参数化的,也可以是一个类型变量。
This subinterface provides information about array types, where the component type of the array is either parameterized or a type variable.
从属类型的标准实例是数组大小参数化的数组。
The canonical example of dependent types is that of an array type parameterized by the size of the array.
参数是强类型的,类型的范围是从基本的非派生类型(布尔(booleans)、字节(bytes)、整型(integers))到高层次数据结构(字符串(strings)、数组(arrays)和字典(dictionaries))。
Arguments are strongly-typed, and the types range from fundamental primitives (booleans, bytes, integers) to high-level structures (strings, arrays, and dictionaries).
如果该类使用相同的参数类型声明了多个公共成员方法,返回数组中都会包括。
If the class declares multiple public member methods with the same parameter types, they are all included in the returned array.
确保属性的一个参数指定了一个具有相同秩(维数)和元素数据类型的数组。
Ensure that one of the property parameters specifies an array with the same rank (number of dimensions) and element data type.
使用指定的上下文返回值参数指定的数组类型的属性的集合。
Returns a collection of properties for the type of array specified by the value parameter, using the specified context.
对于参数数组,请提供元素类型与参数数组的元素类型相同的一维数组。
For the parameter array, supply a one-dimensional array with the same element type as the parameter array's element type.
如果变量或参数的维数与分配给此变量或传递给此参数的数组的维数(或类型)不匹配,将产生类型不匹配错误。
A type mismatch error will result if the dimensionality of a variable or parameter does not match the dimensionality (or type) of the array assigned to the variable or passed to the parameter.
元素类型与参数数组的元素类型相同的数组。
An array with the same element type as the parameter array's element type.
其默认值是参数数组元素类型的空一维数组。
Its default value is an empty one-dimensional array of the parameter array's element type.
索引器参数括在方括号中,这一点与数组索引类似;但可以将索引器参数声明为任何类型,这一点与数组索引不同,后者必须为整形。
Indexer parameters are enclosed in square brackets, just like array indexes, but indexer parameters can be declared to be of any type, unlike array indexes, which must be integral.
因为编译器不能从这个方式阻止你破坏类型安全,它只能阻止你创建任何的参数化类型类型数组。
Since the compiler can't prevent you from defeating type safety in this way, it instead prevents you from creating any array of generic type.
因为编译器不能从这个方式阻止你破坏类型安全,它只能阻止你创建任何的参数化类型类型数组。
Since the compiler can't prevent you from defeating type safety in this way, it instead prevents you from creating any array of generic type.
应用推荐