相同的型别推断规则也适用于静态方法和执行个体方法。
The same rules for type inference apply to static methods and instance methods.
编译器会对共用相同名称的所有泛型方法套用型别推断逻辑。
The compiler applies type inference logic to all generic methods that share the same name.
如果无法从资料推断型别,就会将资料解译为字串资料。
If the type cannot be inferred from the data, it is interpreted as string data.
如果您没有指定阵列元素的型别,则会从阵列常值中的值推断其型别。
If you do not specify a type of the array elements, the type is inferred from the values in the array literal.
您可以建立隐含型别的阵列,在其中阵列执行个体的型别是由阵列初始设定式中指定的项目推断。
You can create an implicitly-typed array in which the type of the array instance is inferred from the elements specified in the array initializer.
属性的型别是由编译器推断。
若要启用推断,泛型方法的参数签章必须包含与方法之型别参数具有相同型别的参数。
To enable inference, the parameter signature of a generic method must include a parameter that is of the same type as the type parameter for the method.
推断的型别可能是内建型别、匿名型别、使用者定义型别,或。
The inferred type may be a built-in type, an anonymous type, a user-defined type, or a type defined in the.
推断的型别可能是内建型别、匿名型别、使用者定义型别,或。
The inferred type may be a built-in type, an anonymous type, a user-defined type, or a type defined in the.
应用推荐