Hi there,
First I started by converting the C# solution to
VB.NET which is my primary language, by using an online converter. It went very well and the converted edition works very well.
But when I tried to use the diff_match_patch with two txt-files, both about 55Mb and about 1,5 mio lines, I get an exception.
I looked into the code and since the code block didn't make any sense I looked at the similar C#-code block. That didn't help.
It's all about:
Java edition: chars.append(String.valueOf((char) (lineArray.size() - 1)));
C# edition: chars.Append(((char)(lineArray.Count - 1))); (line ~731 in the DiffMatchPatch.cs)
converted into VB.NET edition: chars.Append(ChrW(lineArray.Count - 1))
The above mentioned line will fill the chars-array with very weird characters. I don't get why someone would locate a character by using the .Count-property of a string-value. It makes no sense what so ever.
In VB.NET I get a type definition exception because the lineArray.Count reaches the char type limit at 65535 chars, and therefor cannot be converted into a char!!!! (again: why would someone convert a char based on length of a string, into a character).
So my question is: what is the chars-array used for if it only contains very weird characters?
//peter