c# - Entering values for a Byte array in WCF Test client -


i'm trying use wcf test client debug web method , method expects 2 byte arrays part of input.

for now, i've been using debugger , placing breakpoints right before passed values used, , setting them visual studio watch window.

is there easy way set values each byte of byte array using wcf test client?

i know can specify length of array typing "length=100" or similar, sets size of array. have click drop down , enter value each , every byte 1 one.

does have experience entering values arrays when using wcf test client?

what i've done creating static method accepts array , new value (i pass comma-separated string , split it, pass "params" arg, etc.).

with this, can call method on debugger watch or immediate window. example, can call "setarrayone()" anytime need preset values, or can call "setarray(...)" , pass desired arguments:

byte[] myclasslevelarray1 = new byte[10]; byte[] myclasslevelarray2 = new byte[10];  public void setarrayone() {     setarray(myclasslevelarray1, 1, 2, 3, 4, 5); }  public void setarraytwo() {     setarray(myclasslevelarray2, 1, 2, 3, 4, 5, 8, 9, 10, 11, 15, 20, 5, 98, 5, 4); }  public static void setarray(byte[] myarray, params byte[] newvalues) {     array.copy(newvalues, myarray, math.min(newvalues.length, myarray.length)); } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -