xtd 0.2.0
Loading...
Searching...
No Matches

◆ write() [1/4]

void xtd::configuration::file_settings::write ( const xtd::string key,
const xtd::string value 
)
noexcept

Writes a specified value for specified key in the global section.

Parameters
keyThe key used to write a value.
valueA string to write.
Remarks
To write permanently use the xtd::configuration::file_settings::save method.
Examples
The following example shows how to create xtd::configuration::file_settings and use xtd::configuration::file_settings::reset, xtd::configuration::file_settings::write and xtd::configuration::file_settings::save methods.
auto file = file_settings {"my_app.ini"};
file.reset();
file.write("quit_application_on_main_form_closed", "true");
file.write("pictures \"Menu\"", "file_open", "resources/symbolic_open.png");
file.write("pictures \"Menu\"", "file_save", "resources/symbolic_save.png");
file.save();
void reset()
Reset current settings.
Represents an object for storing and retrieving configuration information using text files in INI for...
Definition file_settings.h:32
my_app.ini:
quit_application_on_main_form_closed = true
[pictures "Menu"]
file_open = resources/symbolic_open.png
file_save = resources/symbolic_save.png