Detailed Method Reference

Namespace: Canley.Utility.CSV.Standard
Class: CSVTable<T>

Definition

public bool RemoveRecord(T record)
  • Description: Removes a specific record instance from the table’s internal memory collection.

  • Workflow:

    1. Validation: Checks whether the target record reference is valid and exists within the internal records list.
    2. Removal: Strips the record instance from the active collection in memory.
  • Parameters:

    • record: The specific record instance to remove from the table.
  • Returns: bool - Returns true if the record was successfully found and removed; false otherwise.

  • Example:

public void DeleteActiveItem(CSVTable<ItemRecord> itemTable, ItemRecord targetItem)
{
    if (itemTable.RemoveRecord(targetItem))
    {
        Debug.Log(message: "Item removed from database memory.");
    }
}

TIP

Remember that removing a record from memory only affects the live list; you must call SaveTable afterward if you want those deletions persisted back to the physical CSV file on disk.