You'll also want to turn on the new Option infer feature. This allows the compiler to infer local variable type declarations by evaluating the right-hand side of the expression.
你也希望根据那些特性打开新的推断特性的选项,这允许编译器通过估计右值表达式去推测出局部变量的申明类型。
Or, when editing code, type the expression first and use this refactoring to automatically create a new local variable to assign the result to.
或者,在编辑代码时,先键入此表达式并使用这种重构自动创建一个新本地变量来指定表达式的结果。
A new local variable of the same type as the method's return value is created for you.
系统将为您创建与该方法的返回值类型相同的新局部变量。
You use the function keyword to denote the start of a function and the var keyword to declare local (as opposed to global) variables, but you do not include the type of the variable being declared.
您可以使用function关键字开始函数的声明,使用var关键字来声明局部变量(这与全局变量不同),但是不用包括正在声明的变量的类型。
For example, Figure 3 shows a local variable called status that has a type of string, because a string is assigned as its value.
例如,图3显示了一个称为status的局部变量,其类型为string,因为指定了一个字符串作为其取值。
As an example, Listing 6 shows what happens when I change the type of the local variable used for the method start time in the interceptor code from long to int.
作为一个例子,清单6展示了在将方法开始时的拦截器代码所使用的局部变量的类型从long变为int时的情况。
To fetch elements from the collection, you had to know the type of object in the collection so you could cast it back to the appropriate local variable.
要从集合中提取元素,您必须知道集合中对象的类型,以将其强制转换为合适的局部变量。
An instance method declares a parameter or a local variable whose name matches an instance field of the declaring type.
实例方法声明一个名称与声明类型的实例字段匹配的参数或局部变量。
Use this function to clear variables of type VARIANTARG (or VARIANT) before the memory that contains the VARIANTARG is freed (as when a local variable goes out of scope).
使用这个函数去清除VARIANTARG(或VARIANT)类型的变量在内存包含的VARIANTARG被释放(当一个局部变量超出作用域时)。
The type of the value must match the type of the local variable as specified in the current method's local signature.
值的类型必须与当前方法的本地签名所指定的局部变量的类型匹配。
Every local variable is initialized to the default value for its data type as soon as the procedure begins running.
只要程序一开始执行,每个区域变数就会初始化为所属资料型别的预设值。
If vis a local variable, it quickly becomes garbage and Clone forces you to use runtime type checking.
如果v是局部变量,它会很快会被视为垃圾,而且Clone要求你在运行时做类型检测。
An exception of this type is thrown if a static local variable fails to initialize.
如果静态区域变数无法初始化,会掷回这个型别的例外状况。
An exception of this type is thrown if a static local variable fails to initialize.
如果静态区域变数无法初始化,会掷回这个型别的例外状况。
应用推荐