I have to enumerate through the members of a collection and create an array with a particular property of the members:
let ops: int array = [| for x in app.Operations ->
let op= x : IAzOperation
op.OperationID |]
Here app.Operations
is a collection of IAzOperation but on enumeration, returns each member as Obj
. So I want to type cast each member and access the property. but not sure how to typecast it.
If I typecast the way I've mentioned here, it gives me error that:
This espression was expected to have type IAzOPeration but here has type obj.
What am I missing here?