I'm trying to create a class that contains an array. However i want to require that the items in the array are themselves of a specific class. Im told there is some sort of tag you can add to do this, but for the life of me i cannot find what it is.
What i hope for is something like:
public class myClass{
public var foo:String;
[ArrayType(class="BarClass")]
public va开发者_JS百科r barArr:Array
}
Cheers
what's wrong with a Vector ?
var barArr:Vector.<BarClass> = new Vector.<BarClass>();
精彩评论