Question: Is there a built-in method in .NET that validates csv files/strings?

I would prefer something like [this online csv validator](http://csvlint.io) but in C#. I have done some research but all I have found are examples of people writing the code themselves (examples were all written a few years ago and might be outdated).

POC:

```
bool validCSV = CoolCSV_ValidatorFunction(string csv/filePath);

```

Answer: 
There is! For some reason it's buried in the VB namespace, but it's part of the .NET Framework, you just need to add a reference to the Microsoft.VisualBasic assembly. The type you're looking for is [TextFieldParser](http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.fileio.textfieldparser.aspx). 

Here is an example of how to validate your file: 

```
using Microsoft.VisualBasic.FileIO;
...
var path = @"C:\YourFile.csv";
using (var parser = new TextFieldParser(path))
{
    parser.TextFieldType = FieldType.Delimited;
    parser.SetDelimiters(",");

    string[] line;
    while (!parser.EndOfData)
    {
        try
        {
            line = parser.ReadFields();
        }
        catch (MalformedLineException ex)
        {
            // log ex.Message
        }
    }
}

```
That CSV Parser also seems promising (Not built-in, though):
<http://www.codeproject.com/Articles/9258/A-Fast-CSV-Reader>

Related thread:
[CSV Parsing Options with .NET](https://stackoverflow.com/questions/9642055/csv-parsing-options-with-net)