Method AppendTimestamp
AppendTimestamp(string, DateTimeOffset)
Appends a timestamp suffix to a file name without modifying its original extension.
public static string AppendTimestamp(string path, DateTimeOffset timestamp)
Parameters
pathstringThe file name on which to append the suffix.
timestampDateTimeOffsetThe timestamp to use for generating the suffix.
Returns
- string
The new file name where
pathhas been modified to end with the round-trip representation of the specifiedtimestampbut without modifying the file extension.