开发者

How to Increase Vector length to 200 after new Vector.<String>(100);

开发者 https://www.devze.com 2023-02-01 15:03 出处:网络
HI All, //Created Vector with the initial length of 100. var v:Vector. = new Vector.(100); v[90] = \"Nin开发者_如何转开发ety\"

HI All,

//Created Vector with the initial length of 100.

var v:Vector. = new Vector.(100);

v[90] = "Nin开发者_如何转开发ety"

v[190] ="oneninety" //RangeError: Error #1125: The index 110 is out of range 100.

//How to change the length from 100 to 200 to store a value at index 190 ?


To change the size of a Vector you just set the length property. eg:

v.length = 200;
v[190] = "something"; // works now
0

精彩评论

暂无评论...
验证码 换一张
取 消