- Declared in: RT.Serialization.Settings.SettingsFile<TSettings>
Declaration
public bool Save(
string filename,
bool? throwOnError = null
)
Summary
Saves the settings object
SettingsFile<TSettings>.Settings to the settings file.
Parameters
string | filename |
Custom filename to save the settings to, ignoring the value of SettingsFile<TSettings>.FileName. |
bool? | throwOnError |
Specifies whether a failure to save settings should be propagated as an exception or silently suppressed
(returning false from this method). If null (the default) then the same value is used as was passed
into the SettingsFile<TSettings> constructor. |
Returns
true
if saved successfully.
false
if the save failed (for example, due to an I/O error). The latter
is only possible if errors are suppressed via
throwOnError.
Remarks
This method completely ignores the existence of background saves initiated by
SettingsFile<TSettings>.SaveInBackground().
Saving to the same filename as
SettingsFile<TSettings>.FileName will result in undefined behaviour.