读写特定的行和列没有...... [英] read and write to perticular line and column no...

查看:130
本文介绍了读写特定的行和列没有......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从一个文件中写入和读取这样的字符在固定行和列号...请帮助我如何做到这一点..

解决方案

你必须使用二进制读/写。



915,000 google搜索词组C#随机访问文件 [ ^ ]


在完成此任务之前,您需要学习一些文本文件中的读写基础知识

< a href =http://msdn.microsoft.com/en-us/library/ezwyzy7b.aspx>如何:从文本文件中读取(C#编程指南) [ ^ ]

如何:写入文本文件(C#编程指南) [ ^ ]

无论你能使用什么

 Dim lines As String()= IO.File.ReadAllLines( 文件路径在这里)



如需更多参考,您可以查看一些给定的链接

在文本文件中查找某一行 [ ^ ]

从VB .net 中的txt文件中读取特定行[ ^ ]


< blockquote>以下是我个人用于类似目的的一些非常有用的链接





http://www.daniweb.com/software-development/csharp/threads/344867/read-rowscolumns-of-numbers-in-a-text-file [<一个href =http://www.daniweb.com/software-development/csharp/threads/344867/read-rowscolumns-of-numbers-in-a-text-filetarget =_ blanktitle =New Window > ^ ]



http: //www.c-sharpcorner.com/Forums/Thread/85767/ [ ^ ]



http://stackoverflow.com/questions/2805495/reading-a-text-file-and-pulling-out-specific-columns [< a href =http://stackoverflow.com/questions/2805495/reading-a-text-file-and-pulling-out-specific-columns\"target =_ blanktitle =New Window> ^

i want to write and read from a file such that character at fixed line and column no... please help me how to do that..

解决方案

You would have to use binary readin/writing.

915,000 google results for search phrase "C# random access file"[^]


You need to learn some basics of reading and writing in textfile before accomplish this task
How to: Read From a Text File (C# Programming Guide)[^]
How to: Write to a Text File (C# Programming Guide)[^]
whatever you can use

Dim lines As String() = IO.File.ReadAllLines("file path here") 


for more reference you can take a look at some given link
Read a certain line in a text file[^]
read a specific line from a txt file in VB .net[^]


Here are some pretty useful Links available that I personally used for similar purpose


http://www.daniweb.com/software-development/csharp/threads/344867/read-rowscolumns-of-numbers-in-a-text-file[^]

http://www.c-sharpcorner.com/Forums/Thread/85767/[^]

http://stackoverflow.com/questions/2805495/reading-a-text-file-and-pulling-out-specific-columns[^]


这篇关于读写特定的行和列没有......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆