开发者

Does Flash support generics (strong typed collection or array)?

开发者 https://www.devze.com 2023-02-26 20:19 出处:网络
Can I开发者_如何学运维 strongly type an array in Actionscript ?Not an Array, but if you\'re targeting Flash Player 10 or higher you can use Vector

Can I开发者_如何学运维 strongly type an array in Actionscript ?


Not an Array, but if you're targeting Flash Player 10 or higher you can use Vector

var v:Vector.<Sprite>;

v is now a strongly typed collection that should only accept Sprite objects.

It's the closest you'll get to generics.

0

精彩评论

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