I'm new on c# and currently working on project so that I need to open an existing text file and editing the content of a specific line (i.e. 32) but I failed! Any help?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
Well, based on your question you know the line number, so do something like this:
the first line of code gets you all the lines of a file into an array. The second line clearly sets thy known line to some value, and the third line overwrites the file with the new set of lines.