Monday, January 09, 2006
C# .NET Text Insertion
So this is an old project, basically with .NET it makes things easier to code, due to all the helpful libraries and helpful utilities. However there are still some things that you should NOT do, such as loading a 200MB file into a string so you can call string.replace or myString.Insert(15,"new string") so as to save it back into a file.(It amazes me that things like this still happen) So how do you insert a text string into the middle of a file? You would have to do it the old fashioned way and move blocks of bytes around so as to insert your string. (I'm not sure why StreamReader/Writer doesn't have this feature, either way a programmer should be able to implement this themself)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment