Hi All,
When I use the function Replace(unwanted, replacement) of stringBuilder, if the "replacement" string length is bigger than "unwanted" length then the method throws "OutOfRangeException". I have microframework 4.2.
Thanks in advance.
I haven't had issues with the replacement text being longer than what it is replacing.
I found a pretty interesting bug back when 4.2 was still alpha-ish; outlined here
Have you tried with a shorter base string? You could possibly be running out of memory on the netduino. Try and compile a simple .NETMF project and run it locally on your PC. If it works there, but not on your netduino, I'm guessing you're asking a bit too much from it.
Possible workaround: Look at an example on the thread I linked above (first post in that thread, iirc) that reads through one char at a time and does the replacing that way. It was Valkyrie-MT's example. [WARNING: It's not pretty]