开发者

GetPrivateProfileString in .NET

开发者 https://www.devze.com 2022-12-21 13:08 出处:网络
Is there a .NET version of GetPrivateProfileString? (I can use p/invoke, I just don\'t want to unless 开发者_开发问答necessary.)Not built in, no.There\'s nothing that can natively read and understand

Is there a .NET version of GetPrivateProfileString?

(I can use p/invoke, I just don't want to unless 开发者_开发问答necessary.)


Not built in, no. There's nothing that can natively read and understand the layout of an .ini file in .NET. GetPrivateProfileString is your best bet.


No, there isn't, at least not in the Base Class Library. This isn't surprizing, given that .NET doesn't have any native support (in the form of pure managed code, or wrappers over P/Invoke calls) for INI files.


If you dont want to use Interop, you can use ini file loader class like this one

http://www.codeproject.com/KB/recipes/INI_Files.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号