回复 10 楼 TonyDeng
哎,好难,框架都弄好了就是在dao层处理序列化对象存储到指定文件的流处理不好。
和尚我爱四处游,疯疯癫癫有理由
开开心心是正道,愁愁烦烦不应该
int index(0); StreamReader^ reader = gcnew StreamReader(inputFile->OpenRead()); while (!reader->EndOfStream) { String^ lineText = reader->ReadLine(); if (lineText->Contains(L"TIME V")) { ++index; StreamWriter^ writer = gcnew StreamWriter(inputFile->DirectoryName + "\\" + index.ToString() + ".TXT"); while (!reader->EndOfStream && (lineText->IndexOf(0x0c) == -1)) { lineText = reader->ReadLine(); if (lineText->IndexOf(0x0c) == -1) { writer->WriteLine(lineText); } } writer->Close(); } } reader->Close();