在VB中,属性是可以有参数的,而VBA中属性使用参数非常常见.比如最常用的:Worksheet.Range("A1:A10") VB的语法,使用参数的不一定是方法,也有可能是属性!(虽然属性的本质是方法) 例一:参数当作"索引"使用 定义一个类模块,模块名称Ints.为简化模型,使用了只读属性. ) As Integer Public Property Get ArrValue(Index As Integer) As Integer ArrValue = arr
class Trangle{ double sideA, sideB, sideC, area, length; boolean flag; Trangle(double a, double b, double c){//public if(a < (b + c) && b < (a + c) && c < (a + b)){ sideA = a; sideB = b; sideC = c; flag = true; } else flag = false
以下来自:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/new The new operator creates an instance of a user-defined object type or of one of the built-in object types that has a constructor function. new constructor[([argument