CopyPastor

Detecting plagiarism made easy.

Score: 0.8016534447669983; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2024-04-12
by Akash Pawar

Original Post

Original - Posted on 2015-11-04
by Gagan Jaura



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Below line of code is worked for me. using (var reader = new StreamReader(file)) { while (!reader.EndOfStream) { var line = reader.ReadLine(); if (!string.IsNullOrEmpty(line)) { var values = line.Split(';'); //Write your logic as per your requirement } } }
Try this
public void ReadCSV() { var reader = new StreamReader(File.OpenRead(@"C:\data.csv")); while (!reader.EndOfStream) { var line = reader.ReadLine(); string[] values = line.Split('your separator'); foreach(string item in values) { Console.WriteLine(item); } } }

        
Present in both answers; Present only in the new answer; Present only in the old answer;