Is there a .NET version of GetPrivateProfileString?
(I can use p/invoke, I just don't want to unless necessary.)
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