开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜