To get started, I would like to clarify that I'm not very good at C #. In this project that I am running in C # using .Net 3.5, I need to create a class for reading and exporting files that contain several fixed-width formats based on the type of record.
Currently, there are 5 types of records indicated by the first character position in each line of the file indicating a specific line format. The problem is that types are different from each other.
Record type 1 has 5 columns, signifies beginning of the file
Record type 3 has 10 columns, signifies beginning of a batch
Record type 5 has 69 columns, signifies a transaction
Record type 7 has 12 columns, signifies end of the batch, summarizes
(these 3 repeat throughout the file to contain each batch)
Record type 9 has 8 columns, signifies end of the file, summarizes
Is there a good library for these fixed-width files? I saw several good ones who want to download the entire file as a single specification, but this will not be done.
250 , 300 . .
, , "", ...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Extract_Processing
{
class Extract
{
private string mFilePath;
private string mFileName;
private FileHeader mFileHeader;
private FileTrailer mFileTrailer;
private List<Batch> mBatches;
public Extract(string filePath)
{ }
public string ToString()
{ }
public void ToFile()
{ }
}
class FileHeader
{ }
class Batch
{
private string mBatchNumber;
private BatchHeader mBatchHeader;
private BatchTrailer mBatchTrailer;
private List<Transaction> mTransactions;
public string ToString()
{ }
}
class BatchHeader
{ }
class Transaction
{ }
class BatchTrailer
{ }
class FileTrailer
{ }
}
Ive , , . , , #, .
, , ? , VBA, FSO, Microsoft Access ImportSpec (5 , spec... wow, !), "" visual foxpro ( FAAAAAAAST, , ), #, , .
, , . , , , .