What language construction can be used to make a compile time checking of Array elements type when the Array is a function parameter?
Let's use this function as an example:
[ArrayElementType("String")]
private function GetNumberArray(parameter:Array):Array {
var myData:Array = [1.0, 2.0, 3.0];
return myData;
}
Here we've marked the returned Array as one containing elements of type string.
Is there a way to mark the parameter
variable as an Array containing elements of certain type?
I'm specially interested in the Array collection. I'm aware of the vector collection but I have reasons not to use it in my case.