ini文件格式以及c#读取ini文件
    在程序中经常要设置一些变量,比如读取数据库服务器的地址等,在程序中写死是一种方法,但是这种写死在程序中很不利于后期维护。windows为我们提供了两种方便的办法,那就是使用注册表或者ini文件来保存少量数据。
ini文件是文本文件,数据格式一般是:
[Section1 Name] 
KeyName1=value1 
KeyName2=value2 
...
[Section2 Name] 
KeyName1=value1 
KeyName2=value2
ini 文件可以分为几个 Section,每个 Section 的名称用 [] 括起来,在一个 Section 中,可以有很多的 Key,每一个 Key 可以有一个值并占用一行,格式是 Key=value。注释用分号隔开
比如下:
[Section1]
;地址
    server =192.168.1.10
;地址端口
    port=1521 
;表空间
    tablespace=gissde
;用户名
    user =gis
 ;密码
    password=gis
[Section2]
    server =192.168.1.10
    port=5004