tags:

views:

51

answers:

1

Is there a way to combine the 'cast' (box) operation as part of the same statement. Here is what I have currently:

let node = dTable.Call("treeNode") 
let nodeobj = ((box node) :?> AxaptaObject)
let meth = nodeobj.Call("AOTFindChild", "Methods")
+4  A: 

'box' is just a function, so you can pipe an expression to it, e.g.

dTable.Call("treenode") |> box :?> AxaptaObject
Brian
or do (box (dTable.Call("treenode"))) :?> AxaptaObject
Massif