Let's say I read a stream into a buffer, and I want to make multiple insertions into this buffer. Is there some efficient helper object I can call to help with this. Say if I want to make an insertion of 10 bytes length at position 100, then 20 bytes length into position 500 (which would now be 510 after inserting the first 10 bytes). What I'm after is something to keep track of where to actually make the insertions when inserting multiple times (otherwise I have to shift all address by the what I've already inserted).
It would be simple to roll my own, but I was wondering if I'm reinventing the wheel here, and this is already included in some .NET construct?