0

Hy guys, I'm new here and I have one error...

I wanna read from one *.ini file but not clasic read.

Here is content of file confing.ini that I wanna read:

[Config]
String0=some text1
String1=some text2
String2=some text3
....

Read that I wanna get is value of String1 for example, in this case some text2.

Is this possible and if it is how can I made that?

Thanks,
Bizz

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by dghervas
0

I've done some of this in vb6 in the past. I dont think you can get exacly what you want out of the file but you can read it line by line and filter till you get what you want out of it. For just reading a file i think you can find code easily. I would find some code for you but i ma in a big hurry. Maybe when i get back if you still need it.


Daniel

0

Well this is possible in VB.NET as Daniel puts it. You will need to read the file line at a time (loop through file records) and store the line result to a variable. Use the split function and = as the separator.

i.e. Dim strVariable() as string = split(FileRecordVariable,"=")

This statement will return an array strVariable with two contents in index 0 and 1. The stVariable(1) is what I guess you are looking for.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.