Object Test Bench and arrays as parameters

Hello!

How do I pass an array as a parameter to the method of the instance of the class in Object Test Bench? I.e. say there is a method that accepts parameter of type byte[], how can I come up with it? I tried typing something like new byte[] {10,20}, but it was not helping. I though about using Framework's Array, but it does not have constructors. Will try ArrayList and then calling ToArray, but I feel that there is gotta be something simpler

[466 byte] By [AlexanderSafronov] at [2007-12-24]
# 1

Hi,

Rightnow the simplest possible option to pass an array is to use immediate window (Debug->Windows->Immediate). eg. to pass array {10,20} to a function which takes byte array as input you can type byte[] bytearray = {10, 20}; in the immediate window. After doing this, during invoke method you can pass this bytearray as the input.

We would consider your scenario into account for future releases and see how can we enable it through OTB window itself.

Thanks!
Sheetal

SheetalKamat at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# IDE...
# 2

This approach doesn't seem to work with VB. In the immediate window I get:

Variable declaration statements are not valid in the Immediate window.

HamishGunn at 2007-8-31 > top of Msdn Tech,Visual C#,Visual C# IDE...