我有一份案文文件,其结构如下:
01|value|value|value|value|value|value
02|value|value|value|value|value|value
03A|value|value|value|value|value|value
03A|value|value|value|value|value|value
.
.
N
04|value|value|value|value|value|value
05|value|value|value|value|value|value
06|value|value|value|value|value|value
.
.
N (variable lines)
I tried to read the text file and add it to a dictionary of type <string, string[]>
in order to use it like MyDic["01"][0]
, this is a fragment of the code:
Dictionary<string, string[]> txtFromFile= new Dictionary<string, string[]>();
string strLine;
using (StreamReader sr = new StreamReader(filePath))
{
while ((strLine= sr.ReadLine()) != null)
{
string[] strNodes= strLine.Split( | );
txtFromFile.Add(strNodes[0], strNodes);
}
}
不幸的是,正如你所看到的那样,这份案文文件可能重复了诸如<代码>03A等关键内容,因此我很想知道,在C#中是否收集了这方面的资料。
<>0> 我看到了一个叫作 look的班子,但没有建筑商。
- Any thoughts my friends?
- What do you suggest?
感谢!