From: Armin Zingler on 4 Sep 2009 19:12 tutiplain schrieb: > It still threw the Exception. Am I missing something? My correction was in Function Base64*En*codeObject not in Base64DecodeObject. Did you change it? You wrote you can't change it for a reason that I did not understand. Armin
From: tutiplain via DotNetMonster.com on 4 Sep 2009 22:27 Oh, I didn't see that. I will try changing that in the encode function. I'll let you know if it works Armin Zingler wrote: >tutiplain schrieb: >> It still threw the Exception. Am I missing something? > >My correction was in Function Base64*En*codeObject not in >Base64DecodeObject. Did you change it? You wrote you can't change it for >a reason that I did not understand. > >Armin -- Message posted via DotNetMonster.com http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-vb-net/200909/1
From: tutiplain via DotNetMonster.com on 5 Sep 2009 09:07 Hello again, You were right! By changing the Base64EncodeObject function to this: Dim buffer(ms.Length - 1) As Byte ms.Read(buffer, 0, ms.Length) It deserialized correctly. It seems I didn't understand how array declarations work in VB. I thought the number inside the ( ) was the length of the arrray ( as in "dim ar(7)" is an array of 0 to 6). Instead it seems that Dim Ar(7) makes an array of 0 to 8. Thank you so much for your help. It is greatly appreciated. tutiplain wrote: >Oh, I didn't see that. I will try changing that in the encode function. >I'll let you know if it works > >>tutiplain schrieb: >>> It still threw the Exception. Am I missing something? >[quoted text clipped - 4 lines] >> >>Armin -- Message posted via DotNetMonster.com http://www.dotnetmonster.com/Uwe/Forums.aspx/dotnet-vb-net/200909/1
From: Family Tree Mike on 5 Sep 2009 09:13 tutiplain via DotNetMonster.com wrote: > Hello again, > <snip> > It deserialized correctly. It seems I didn't understand how array > declarations work in VB. I thought the number inside the ( ) was the length > of the arrray ( as in "dim ar(7)" is an array of 0 to 6). Instead it seems > that Dim Ar(7) makes an array of 0 to 8. > <snip> Just to clarify, Dim Ar(7) makes an array of 0 to 7. -- Mike
From: Armin Zingler on 5 Sep 2009 09:36 tutiplain via DotNetMonster.com schrieb: > Dim Ar(7) makes an array of 0 to 8. In addition to Mike: In previous VB verions you were able to specify the lower and upper bound of the array, e.g. Dim bla(-17 To 95) so you were able to access bla(-17) .... bla(95) The lower bound was optional, so Dim bla(95) was equal to Dim bla(0 To 95) (unless the default lower bound had been changed to 1 by writing "Option Base 1"). Therefore, the number inside the braces is still the upper bound - I probably would have made 1001 mistakes if this would have been changed - and with 0-based arrays the length is naturally upper bound + 1. Armin
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: filling datagridview with excel file data Next: Entity, problem with entity key |