Forum Discussion

bwehking's avatar
bwehking
Occasional Contributor
7 years ago
Solved

Read array of strings from dotNet (CLR Bridge)

Hello,   I guess I miss something obvious:   I'm using TestComplete 12.31.1833.7. I use the CLR Bridge to call a .NET method which returns an array of strings. The documentation says that "singl...
  • HKosova's avatar
    7 years ago

    Hi Bernd,

     

    Try the Array.Get method:

    functions.Get(0)
  • bwehking's avatar
    bwehking
    7 years ago

    Hello,

     

    thank you for pointing me in the right direction! But that means, that the documentation is wrong:

    Single-dimensional arrays have to be accessed without using OleValue and the array elements need to be addressed using Get(), as it is stated for multi-dimensional arrays.

     

    This worked:

    var justTrying = Config.myConfig.get_ArrayForTestComplete();
    var first = justTrying.Get(0);

    I guess, the documentation should be reviewed.

     

    Thank you!

     

    Bernd