Jump to content
Xtreme .Net Talk

Recommended Posts

  • *Gurus*
Posted

INI files are depreciated. Use XML files instead, the framework provides plenty of methods for reading and writing those.

 

If you really must use INI files, you'll probably have to resort to use the API or writing your own routines to parse them.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

Posted
Don't you know that it's extremely bad etiquette to correct people's spelling and/or grammar on internet forums? Especially considering the number of people who use them of whom English is not their first language.

TT

(*_*)

 

There are 10 types of people in this world;

those that understand binary and those that don't.

  • Leaders
Posted
If I thought for a second that the recipient might be even slightly offended I would never, but in this case I was confident that I wouldn't send divil into a downward spiral of self-deprecating depression by goofind around a bit. Methinks divil will recover from my quip in no time. If I'm wrong, my sincere apologies divil:(
--tim
Posted

Thanks to Datahighway about a sample.

But... This method use API declaration like in VB6!

There are not ready-made object in VB.NET?

  • Leaders
Posted
There are not ready-made object in VB.NET?

Yes, as divil said, for the replacement, xml files. There's great built-in support. You've still not answered why you would ever want an ini file instead of the xml file?

--tim
  • *Experts*
Posted

If you must read an INI file from a program that you're not writing, you will have to use the API. If you're writing an application, I wouldn't use an INI - use XML or the registry.

 

I haven't seen any support for reading/writing INIs in the .NET framework whereas the API was made just for that purpose. It takes care of all the file parsing and is the recommended way to read/write an INI file.

 

-Nerseus

 

edit:

P.S. It might be worth mentioning that most of the old windows INI files exist for backwards compatability. For instance, ODBCINST.INI, which contains ODBC drivers, is now in the registry. Pretty much everything you would want from win.ini or system.ini is in the registry. If you're looking for something specific from an INI file go ahead and ask - maybe there's a better way to get at it now than through an INI.

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...