CsvFile Class

Version 0.0.2
.NET Framework 4.7
Namespace Skybrud.Csv
Assembly Skybrud.Csv.dll
Visibility Public
Inheritance Object

Class representing a CSV file parsed either from a file or a string.

public class CsvFile { }

Fields

Type Name Value Summary
CsvSeparator DefaultSeparator 1

Gets the default CSV separator.

Properties

Type Name Summary
Encoding DefaultEncoding

Gets tghe default encoding.

CsvSeparator Separator

Gets or sets the seperator used in the CSV file.

Encoding Encoding

Gets or sets the encoding used in the CSV file.

String Path

Gets the path from where the CSV file was loaded.

bool HasPath

Gets whether this instance has a reference to the path the CSV file was loaded from.

CsvColumnList Columns

Gets a list of the columns of the file.

CsvRowList Rows

Gets a list of the rows of the file.

Methods

Adds a new column to the file.

Adds a new row to the file.

Load(string) (static)

Loads the CSV file at the specified path

Loads the CSV file at the specified path.

Loads the CSV file at the specified path.

Loads the CSV file at the specified path.

Load(Stream) (static)

Loads a new CSV file from the specified stream.

Loads a new CSV file from the specified stream.

Loads a new CSV file from the specified stream.

Loads a new CSV file from the specified stream.

Parse(string) (static)

Parses the specified text into an instance of CsvFile, using DefaultSeparator as a separator.

Parses the specified text into an instance of CsvFile, using the specified separator.

Saves the CSV file to it's original path.

Saves the CSV file to the specified path.

Saves the CSV file at the specified path, using the specified separator and CsvFile.Encoding.

Saves the CSV file at the specified path, using CsvFile.Separator and the specified encoding.

Saves the CSV file at the specified path, using the specified separator and encoding.

ToString() (virtual)

Returns a string representation of the CSV file.

Returns a string representation of the CSV file, using the specified separator.