Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB.NET
|
VB.NET General VB.NET discussions for issues that don't fall into other VB.NET forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 13th, 2007, 08:03 PM
Registered User
 
Join Date: Nov 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default [VB 2005] Parser help involving a 2d array

I am attempting to use a parser to read a text file. Then I am wanting that information to be stored into an 2d array. The problem is that the program will not run because it tells me that a parser can only be a 1d array. Does anyone know a way around this?

Code:
Dim CPI As String = "c:\champ.txt"
        Dim fields1 As String(,)
        Dim delimiter As String = ""
        Dim rownumber As Integer
        Using parser As New TextFieldParser(CPI)
            parser.SetDelimiters(delimiter)
            While Not parser.EndOfData
                ' Read in the fields for the current line
                fields1 = parser.ReadFields()
            End While
end using

The main part I am having a problem with is in bold





Similar Threads
Thread Thread Starter Forum Replies Last Post
reg conn to sql server 2005 from vb.net 2005.. veda SQL Server 2005 2 July 1st, 2008 12:16 AM
Go from 2d Array to 1d array without defining type OneQuestion General .NET 1 January 10th, 2008 11:13 AM
VB ISO8583 Messege Parser bilalmuslim Pro VB 6 2 August 2nd, 2007 06:22 AM
Worked on ASP 2005 but new to VB 2005 akhilhp Visual Basic 2005 Basics 0 May 18th, 2007 12:37 AM
2D? biozal BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 3 May 3rd, 2007 07:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.