Remon wrote:I will try writing a string class based over bytes (supports ASCII only), got any ideas ?
Why not write a stream so you are never reading more than a handful of bytes and convert them on the fly as you return them - especially if you know the separator char and the values are all ints .. you code might then look like this ...
_Priority = stream.NextInt()
_Facility = _Priority >> 3;
_Severity = _Priority & 7;
_Timestamp = new DateTime( long.Parse( stream.NextLong() );
_DeviceName = stream.NextString();
You could then do whatever conversion you need in the specific methods based on a buffer of the last few bytes before the last separator?