Detailed Method Reference
Namespace Canley.Utility.CSV.Standard
Class CSVRecord
Definition
public string GetRaw(string fieldName, string defaultValue = )Description Safely retrieves a raw string value from the underlying shadow dictionary with a fallback default.
Workflow
1. Lookup Checks the rawValues dictionary for the specified field name.
2. Resolution Returns the associated string value if present, otherwise returns the provided default value.
Parameters
fieldName The column header key to look up in the shadow dictionary.
defaultValue The fallback string to return if the key is not found.
Returns string - The retrieved field value or the default fallback.
Example
public void ReadOptionalField(CSVRecord record)
{
string description = record.GetRaw(Description, No description provided.);
Debug.Log(message description);
}[!TIP]
Use GetRaw instead of direct indexer access when a column might be missing from your CSV, preventing key-not-found exceptions.