/// <summary> /// Writes the current csv record to the stream and clears its cotnent /// </summary> /// <returns> /// A CSV formatted string if values are available; otherwise null. /// </returns> public string Write() { var line = _csvLineBuilder.Write(_csvValues); Array.Fill(_csvValues, null); return(line); }
/// <summary> /// Converts a list of string values to a CSV text line /// </summary> /// <param name="csvLineWriter">The <see cref="CsvLineBuilder"/></param> /// <param name="values">List of string values</param> /// <returns> /// A CSV formated text line /// </returns> public static string Write(this CsvLineBuilder csvLineWriter, params string[] values) { return(csvLineWriter.Write(values as IEnumerable <string>)); }