Reading from a CSV File and Searching for a Record in C#
Greetings, I am back and shall be showing you how to read a record from a CSV file (or a text file with comma seperated values) using C#. To read a file using C# you have to simply read every line of the file into an array, then add each field of a record to an array and check if a field matches a search term, if it has, the record was found in the file, of not continue searching the file. If you have searched the file and no record was found, then the record didn’t exist in the file or an error occured, if this happens, we can print a message to inform the user.
Subscribe to keep notified when I upload:
Social media:
Instagram:
Twitter:
Reading from a CSV File and Searching for a Record in C#
Nguồn:https://wijstaanvooronzegrondrechten.org/
i love u brah
Hi Josh, when are you uploading the code
Dear Max,
Your explanation is superb, could you let me know what if I want to get a specific value of a line
Let me give an example..
I have a csv file ABC.Txt file with contents as indicated below
Name, Age, TelNum, Emailid
Chris, 42, 5555, chris.walker@gmail.com
Rob, 35, 6666, rob.randell@gmail.com
from my C# Script, i want to vlookup by a specific name and get information like age (or) TelNum (or) EmailId.
e.g for Chris, if I query for Emailid , i must get his emailid which is chris.walker@gmail.com.
Appreciate if Could I get a typical code example for this
Cheers!!
Venkat
superb video, if i want to select data by date duration and time duration how to do it that one
How to edit the file
By the logic.
To edit we have to delete the file and create again with the edits I am correct?
make a video on how to take down the evil conservatives
Absolutely love your content. Keep up the good work. Please do how to display videos in java. Thx
please how to edit a record