Delphi reads and writes the INI file instance // -- mainly implements two processes: when the form is closed, the interface information of the file is saved; when the form is created, the program reads the information stored in the file. // -- Uses
Who said that Delphi has no hash? -- Performance Comparison Between tstringlist and thashedstringlist in Delphi
Many people have seen that Delphi does not have hash tables. These people are very conscious, but there are still many people who prove
Using System;Using System.Collections.Generic;Using System.Linq;Using System.Text;Using System.Collections.Specialized;Using System.IO;Using System.Runtime.InteropServices;Using System.Windows.Forms;Namespace test{Class of Inifilespublic class
First, it is necessary to understand the structure of the INI file:; note[section name]Keyword = value...The----INI file allows multiple subsections, each of which allows for multiple keywords, followed by the value of the keyword.There are three
There is an INI file with the following content:
[Marc]Cnperi = ABC123
The first character and the last character are CHR (31) CHR (30). They are both invisible characters.
Procedure tform1.button1click (Sender: tobject); var ini: Tinifile;
Please respect the original: Original address: Click to open the link
:: WritePrivateProfileString (_t ("Options"), _t ("Name"), M_strname, Papp->m_szini);INI file programming, WINAPI function Writeprivateprofilestring,getprivateprofilestring
Tstringlist is a commonly used string list type. Its usage is not described here. However, when the number of data items increases, tstringlist searches (mainly name/key searches and indexof searches) the performance will drop sharply because the
INIFILE Management
By clin003 at 20070528 from: http://blog.csdn.net/clin003INI files play an important role in system configuration and saving and setting application parameters, for example, VB, Vc, VFP, and Delphi all provide methods to read and
Reproduced in Baidu space: http://hi.baidu.com/graspa/blog/item/d17d928b4ec949d0fc1f1007.html/cmtid/ccf49bd4288f080fa08bb74e
I. It is necessary to understand the structure of the INI file:
; Comment
[Section name]
Keyword = Value
...
---- The INI
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.