In C # Read and write the INI file a piece of code, in fact, this article just pointed out a direction, I hope we can analogy.
The following is the full code:
Write INI file[DllImport ("kernel32")]private static extern bool WritePrivateProfileString
In C # Read and write the INI file a piece of code, in fact, this article just pointed out a direction, I hope we can analogy.
Write INI file
[DllImport ("kernel32")]
private static extern bool WritePrivateProfileString (string section, string
This article mainly introduces C # using PHP server-side Web service communication examples, need friends can refer to the following Note: In this example, the Web service is constructed using a SOAP method, which is used to build the SOAP
Function
Although vb.net read XML configuration information is convenient, but sometimes the process of development or to use the INI file, in the vb.net read INI is not as convenient as VB, just wrote a function, now posted, perhaps you can use.'
C # language is still more common things, here we mainly introduce C # to INI file operations, including the introduction of the INI file to write operations and so on.
C # operations on INI file
The INI file is written and is implemented through
There are no classes in C # that read and write INI files, but they are easy to implement with API functions.
The form code is as follows:
Using System;Using System.Collections.Generic;Using System.ComponentModel;Using System.Data;Using
Our C # Read and write configuration files are usually read and written to files with IO. I think using WINAPI's Kernel32.dll to read INI file is better and more convenient
Read and write to INI file we can use the WritePrivateProfileString (write)
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service