in Visual C++ i had :

Set/GetPrivateProfileString , GetPrivateProfileint and more , creating a file with a label and a tag for each variable like :

[House]
chairs=5
doors=7
[City]
hospitals=2
airport=1.

Is there a better way to save values of variables when the application is closed and get them when the application starts ?

and if not , how do i make an ini file in C# ?