Click here to Skip to main content
15,893,588 members
Articles / Programming Languages / C#

A Modified C# Implementation of Tony Selke's TextFieldParser

Rate me:
Please Sign up or sign in to vote.
4.31/5 (21 votes)
27 Feb 20052 min read 104.8K   964   38  
A C# implementation of the TextFieldParser class submitted by Tony Selkes that includes the ability to put the schema in an XML file and load the data directly into a DataTable.
1,"string1",string1,0.80000,false,80.27,2/27/2005,1,1,1,1,9,1,Object1,"string1",string1,0.8,false,80.272,1,1,1,1,4,1,Object1,"string1",string1,0.8,false,80.272,1,1,1,1,3,1,Object1,"string1",string1,0.8,false,80.272,1,1,1,1,8,1,Object1
2,"string2",string2,1.60000,false,160.54,2/28/2005,2,2,2,2,2,2,Object2,"string2",string2,1.6,false,160.544,2,2,2,2,5,2,Object2,"string2",string2,1.6,false,160.544,2,2,2,2,2,2,Object2,"string2",string2,1.6,false,160.544,2,2,2,2,8,2,Object2
3,"string3",string3,,true,240.82,3/1/2005,3,3,3,3,8,3,Object3,"string3",string3,2.4,true,240.816,3,3,3,3,1,3,Object3,"string3",string3,2.4,true,240.816,3,3,3,3,2,3,Object3,"string3",string3,2.4,true,240.816,3,3,3,3,4,3,Object3
4,"string4",string4,3.20000,false,321.09,3/2/2005,4,4,4,4,8,4,Object4,"string4",string4,3.2,false,321.088,4,4,4,4,2,4,Object4,"string4",string4,3.2,false,321.088,4,4,4,4,6,4,Object4,"string4",string4,3.2,false,321.088,4,4,4,4,5,4,Object4
5,"string5",string5,4.00000,false,401.36,3/3/2005,5,5,5,5,4,5,Object5,"string5",string5,4,false,401.36,5,5,5,5,3,5,Object5,"string5",string5,4,false,401.36,5,5,5,5,6,5,Object5,"string5",string5,4,false,401.36,5,5,5,5,8,5,Object5
6,"string6",string6,4.80000,true,481.63,3/4/2005,6,6,6,6,8,6,Object6,"string6",string6,4.8,true,481.632,6,6,6,6,1,6,Object6,"string6",string6,4.8,true,481.632,6,6,6,6,7,6,Object6,"string6",string6,4.8,true,481.632,6,6,6,6,5,6,Object6
7,"string7",string7,5.60000,false,561.90,3/5/2005,7,7,7,7,6,7,Object7,"string7",string7,5.6,false,561.904,7,7,7,7,1,7,Object7,"string7",string7,5.6,false,561.904,7,7,7,7,7,7,Object7,"string7",string7,5.6,false,561.904,7,7,7,7,7,7,Object7
8,"string8",string8,6.40000,false,642.18,3/6/2005,8,8,8,8,3,8,Object8,"string8",string8,6.4,false,642.176,8,8,8,8,4,8,Object8,"string8",string8,6.4,false,642.176,8,8,8,8,5,8,Object8,"string8",string8,6.4,false,642.176,8,8,8,8,7,8,Object8
9,"string9",string9,7.20000,true,722.45,3/7/2005,9,9,9,9,3,9,Object9,"string9",string9,7.2,true,722.448,9,9,9,9,7,9,Object9,"string9",string9,7.2,true,722.448,9,9,9,9,9,9,Object9,"string9",string9,7.2,true,722.448,9,9,9,9,5,9,Object9
10,"string10",string10,8.00000,false,802.72,3/8/2005,10,10,10,10,5,10,Object10,"string10",string10,8,false,802.72,10,10,10,10,9,10,Object10,"string10",string10,8,false,802.72,10,10,10,10,6,10,Object10,"string10",string10,8,false,802.72,10,10,10,10,5,10,Object10

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
I have BA in Computer Science from a small college in Indiana. I have been programming for about 7 years - mostly business applications.

Comments and Discussions