You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Allow the use of CsvReader after CsvDataReader is disposed.
Describe the solution you'd like
Add CsvDataReader constructor parameter leaveOpen with default value false to decide whether CsvReader should be disposed together with CsvDataReader.
Additional context
Currently, there is no way to prevent CsvReader from being disposed when CsvDataReader is disposed.
It would be nice to have such an option and be able to reuse CsvReader after CsvDataReader is diposed:
using (var reader = new StreamReader("path\\to\\file.csv"))
using (var csv = new CsvReader(reader, CultureInfo.InvariantCulture))
{
using (var dr = new CsvDataReader(csv))
{
// do somework with CsvDataReader
dr.Read();
}
// right now, can't reuse CsvReader here because it is already disposed
//csv.Read();
}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Allow the use of
CsvReader
afterCsvDataReader
is disposed.Describe the solution you'd like
Add
CsvDataReader
constructor parameterleaveOpen
with default valuefalse
to decide whetherCsvReader
should be disposed together withCsvDataReader
.Additional context
Currently, there is no way to prevent
CsvReader
from being disposed whenCsvDataReader
is disposed.It would be nice to have such an option and be able to reuse
CsvReader
afterCsvDataReader
is diposed:The text was updated successfully, but these errors were encountered: