I have written the following code 2 read a txt file. The problem with
this code is the first line is an empty line, it cannot detect it n
starts reading from d 2nd line.
How would I find out if the 1st line is empty. Plz help asap.
Here's the code:
TextFieldParser inboundFileParser = new TextFieldParser(@"H:\D\Test
Files\Invoice Order Test Data\Business Validation\810.txt");

            inboundFileParser.TextFieldType = FieldType.Delimited;//
Indicates that the file to be parsed is delimited


            //====asterisks as the delimiter
            inboundFileParser.SetDelimiters("*", "~");
            inboundFileParser.TrimWhiteSpace = false;
                        int length, recCount = 0, recCountFor20;
            recordLevel = String.Empty;

            //Reading the file line by line.
            while (!inboundFileParser.EndOfData)
            {
                try
                {
                    //Reading
                    currentRow = inboundFileParser.ReadFields();


Thanx,
Clyde

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web 
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/DotNetDevelopment

You may subscribe to group Feeds using a RSS Feed Reader to stay upto date 
using following url  

<a href="http://feeds.feedburner.com/DotNetDevelopment";> 
http://feeds.feedburner.com/DotNetDevelopment</a>
-~----------~----~----~----~------~----~------~--~---

Reply via email to