سلام بر برنامه نویسان عزیز 😉 در این مطلب کد خواندن فایل INI » گرفتن Private Profile String در #C را آماده کردم. انشاالله که این کد براتون مفید باشه.
کد خواندن فایل INI » گرفتن Private Profile String در #C :
using System;
using System.Runtime.InteropServices;
using System.Text;
class MainClass
{
// Declare the unmanaged functions.
[DllImport("kernel32.dll", EntryPoint = "GetPrivateProfileString")]
private static extern int GetPrivateProfileString(string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);
static void Main(string[] args)
{
string section = "SampleSection"
string key = "Key1";
string filename = "\\initest.ini";
using System.Runtime.InteropServices;
using System.Text;
class MainClass
{
// Declare the unmanaged functions.
[DllImport("kernel32.dll", EntryPoint = "GetPrivateProfileString")]
private static extern int GetPrivateProfileString(string lpAppName, string lpKeyName, string lpDefault, StringBuilder lpReturnedString, int nSize, string lpFileName);
static void Main(string[] args)
{
string section = "SampleSection"
string key = "Key1";
string filename = "\\initest.ini";