length
返回列表的大小。
语法 (Syntax)
List.length
例子 (Example)
void main() {
var lst = new List();
lst.add(12);
lst.add(13);
print("The length of the list is : ${lst.length}");
}
它将产生以下output - 。
The length of the list is : 2
返回列表的大小。
List.length
void main() {
var lst = new List();
lst.add(12);
lst.add(13);
print("The length of the list is : ${lst.length}");
}
它将产生以下output - 。
The length of the list is : 2