在C#中读取并获取固定空格分隔的文本文件,请帮助 [英] Reading and Get the Fixed Space Delimited Text File in C#, pls help

查看:96
本文介绍了在C#中读取并获取固定空格分隔的文本文件,请帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,先生
祝大家有美好的一天!我可以问一下C#中的示例代码如何读取和获取固定空格分隔的文本文件(以下示例为文本文件的格式)并将其存储在数组循环或临时文件中吗?这样我就可以操纵每个领域.预先感谢先生.

Hi Sir,
Good day to all!, can I ask sample code in C# on how to read and get the fixed space delimited text file (as a sample below is the format of text file) and and store it on the array loop or temp file? so that I could manipulate every field. Thanks in advance sir.

tag ord_no  ref_no  prog_no    prog_date           acv_type_id
--- ------- ------- ---------- ------------------- -----------
DL 6636500    1       11       Feb 3 2011 11:11AM  DLINSTLN
DL 6649978    1        8       Feb 4 2011 12:29PM  DLINSTLN
DL 6722809    1        3       Feb 2 2011  5:35PM  DLINSTLN

推荐答案

我认为此链接将为您提供帮助
分割方法
i think this link will help you
Split Method


请参阅此CP文章-用于解析固定宽度或定界文本文件的包装器类 [ ^ ]
Look at this CP Article - Wrapper Class for Parsing Fixed-Width or Delimited Text Files[^]


这篇关于在C#中读取并获取固定空格分隔的文本文件,请帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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