中易网

vb.net 读取配置文件,求大神帮忙!急急急!!!!!

答案:2  悬赏:50  
解决时间 2021-04-09 00:28
配置文件的形式如下:

b1
c1


b2
c2

就是下都有和但是他们的值时不同的,我是想能够取得的名字,来区分和的值是谁下边的值?
最佳答案
  • 二级知识专家网友:茫然不知崩溃
  • 2021-04-08 03:30
element.value
全部回答
  • 1楼网友:不服输的倔强
  • 2021-04-08 04:22
declare function getprivateprofilestring lib "kernel32" alias "getprivateprofilestringa" (byval lpapplicationname as string, byval lpkeyname as string, byval lpdefault as string, byval lpreturnedstring as string, byval nsize as integer, byval lpfilename as string) as integer  'api函数中long类型参数和返回类型要改为integer。    public function getini(byval section as string, byval appname as string, byval lpdefault as string, byval filename as string) as string         'dim str as string = lset(str, 256) 'lset没用过,初看一下类似left函数。再说执行lset时str参数还没定义呢,会产生运行时错误。         dim str as string = space(256)         getprivateprofilestring(section, appname, lpdefault, str, len(str), filename)         return microsoft.visualbasic.left(str, instr(str, chr(0)) - 1)     end function
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯