Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
FileFormatReader - like Entity framework for files
Author:
Zvonimir Begic
E-mail:
Click to e-mail author
Submitted:
12/15/2011
Version:
C#
Compatibility:
C#
Category:
File Manipulation
Downloads:
1830
This class can simplify file using. When you have a file with some formatting, you can use FileFormatReader. You can imagine Entity like some structre. Every structure represent lines of text. Formated lines you can imagine like columns. How to use it: This is some sample file: John##Johnson New York&30**Writter Ben##Benson Zagreb&25**Student To read this file just set: FileFormatReader f = new FileFormatReader("myfile.txt"); f._EntityLineNumbers = 3; f.AddLineFormat("s##s"); f.AddLineColumns("Name", "LastName"); f.AddLineFormat("s&s**s"); f.AddLineColumns("City", "Age", "Job"); f.AddLineFormat(""); f.AddLineColumns(""); f.ReadFile(); When you specify lineformat, with s character specify string value( your data), and other characters represent delimiters. This will make your programming easier. Enjoy!
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement