StringBuilder class unavailable
#1
Posted 21 September 2010 - 01:14 AM
http://msdn.microsof...y/ee436407.aspx
However, System.Ext.Text is not listed when I try to add it as a reference in my project. Is it because the Netduino implementation of .NET Micro Framework does not have it? If so, what's the best way to get a definitive list of classes and docs of what's really available? Thanks.
PS: Adding mfdpwsextensions.dll does not help either :-(
#2
Posted 21 September 2010 - 01:47 AM
#3
Posted 21 September 2010 - 01:59 AM
Thanks Chris! That'll do.Hi hari,
.NET Micro Framework doesn't have a StringBuilder in its core, so we've made one in managed code.
See this post for more details:
http://forums.netdui...ch__1#entry1096
Chris
So the MS documentation is wrong?! that page specifically says: "Available in the .NET Micro Framework versions 2.5, 3.0, 4.0, and 4.1."
#4
Posted 21 September 2010 - 02:02 AM
Thanks Chris! That'll do.
So the MS documentation is wrong?! that page specifically says: "Available in the .NET Micro Framework versions 2.5, 3.0, 4.0, and 4.1."
I'd have to double-check, but I think it's part of the optional DPWS libraries...which are much too large for a smaller device like the Netduino. Someone will correct me if I'm wrong on that...
#5
Posted 21 September 2010 - 02:57 AM
I'd have to double-check, but I think it's part of the optional DPWS libraries...which are much too large for a smaller device like the Netduino. Someone will correct me if I'm wrong on that...
Yes, it's part of DPWS.
#6
Posted 21 September 2010 - 07:03 AM
Take a seat, I'll be right with you.
#7
Posted 21 September 2010 - 03:45 PM
Yes, I am appending to a string many-many times. I'm building a line out of characters received via SerialPort.DataReceived event, so on a slow input, I end up appending one character at a time as they arrive.Why not just concatenate yourself? On a PC with more free CPU time than you know what to do with, using something like string builder is ok. On something like Netduino where both CPU and memory are limited, what is the advantage of using string builder class other than "it's easy for me to read and write"?
If you want to append within a string, fine, but for normal concatenation?
With the added overhead of csharp and "common" ways of writing code, Netduino could be seen as slow when it's not really the hardware's fault.
I decided to keep them in a simple byte[] array buffer and only copy into a string when I find a new line character.
Thanks for all the insights everyone.
#8
Posted 21 September 2010 - 07:28 PM
Take a seat, I'll be right with you.
#9
Posted 23 September 2010 - 01:29 PM
Take a seat, I'll be right with you.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users