I am using Visual Basic 10, and am attempting to convert an old VB6 program. How do I read a csv file and load the fi开发者_StackOverflowelds into individual VB10 fields?
Define a class with the matching fields. Instantiate that class and set its values to what's in the CSV file. There are libraries that can help parse the CSV file, such as FileHelpers or you can take a more manual approach using the System.Io.File Class and string manipulation to parse the CSV file.
精彩评论