the type or namespace “TextFieldParser” could not be found

后端 未结 3 1623
甜味超标
甜味超标 2021-01-19 00:15

I am trying to use TextfieldParser that was found within Reading CSV files using C#. I am using VS 2010 and doing this in C#.

I keep on getting \"the type or namesp

3条回答
  •  天命终不由人
    2021-01-19 00:48

    In Visual Studio, right click on References in the Solution Explorer side panel. Click "Add Reference".

    In that list be sure to check Microsoft.VisualBasic. Hit OK.

    Now in the namespace, add Using Microsoft.VisualBasic.FileIO.

    That will allow you to use TextFieldParser. For a good, easy example on how to use it, look here: http://geekswithblogs.net/brians/archive/2010/07/07/whats-a-nice-class-like-textfieldparser-doing-in-a-namespace.aspx

提交回复
热议问题