No matter which function or method creates these quotes, you can replace them all.
String myUrl = str[0]; myUrl = myUrl.Replace("\"", ""); GetImage(myUrl, str[4]);
I think your files contain quotation marks or their parseCSV method.
Update:
I used this code and it works without any problems and without quotes:
static void Main(string[] args) { string fileName = "Test"; //folderBrowserDialog1.ShowDialog(); string saveLocation = ".\\"; //textBox2.Text = saveLocation; List<string[]> file = new List<string[]> { new string[] { "http://www.example.com", "1", "1", "1", "1"}, new string[] { "http://www.example.com", "2", "2", "2", "2"}, }; int count = 0; foreach (string[] str in file) { if (count != 0) { GetImage(str[0], str[4]); } count++; } //GetImage(@"http://www.example.com/picture.jpg", "1"); } private static void GetImage(string url, string prodID) { string saveLocation = ".\\"; // textBox2.Text + @"\"; ; saveLocation += prodID + ".jpg"; WebClient webClt = new WebClient(); Console.WriteLine(url); webClt.DownloadFile(url, saveLocation); }
source share