Save

bool Save<T>(string key, T data)

Purpose: Saves data of type T to a specified file path.

Parameters:

  • key: A string that is used to determine the file path.

  • data: The data to be saved, constrained to reference types (classes).

Return Value: Returns true if the save operation was successful, false otherwise

public void Save()
{
    bool result = _dataPersistenceService.Save("Key", _data);
}

Last updated