Avatar of MikeCombe
MikeCombeFlag for United States of America asked on

How to use a text file as a program configuration file


Using VB.net, VB6, Microsoft Visual Studio

I want to develop a pc-based software program that uses a text file to store/load configurations for the software program. I'm thinking that I can write data to the text file on each line using a delimiter to separate the fields. At the carriage return it would create a new line. Each line would act similar to a single row in a database field. The software program would save the various data to the text file, or open and read the text file to "load" the data back into system memory, arrays, or whatever.

I cannot use a database for this project.

Here's my questions:
1. Does my approach sound like I'm on track?
2. Can I scan "lines" in a text file to grab particular data and then "load" that into system memory, arrays, etc.?

Thanks for any tips you can offer.

---- Mike
.NET ProgrammingVisual Basic.NET

Avatar of undefined
Last Comment

8/22/2022 - Mon
Jorge Paulino

But this is vb6 or vb.net ?

Jorge Paulino

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Pretty good idea. Thanks !
Even better for me is a custom XML config file. That enables me to read/write anything I want, in MY particular Xml format.
Your help has saved me hundreds of hours of internet surfing.