Looking at your code sample, the
myList
variable is not in the scope of your
dt()
method. You need to pass the result from
ReadValues(...)
method and pass it to your
dt()
method ... something like
public static DataTable dt(IList myList)
{
}
Then to call:
var table = dt(ConvertCSVtoDataTable(inFilePath));