I am trying to get a line foreach line in a webclient.DownloadString("pastebinsite"); but it says cannot convert type 'char' to 'string', so I add a string[] downloaded = wc.DownloadString(arac[0] + arac[1] + @"//" + arac[2] + "/raw/" + arac[3]);
that does not work because it says cannot convert type 'string' to 'string[]' I am stuck and cannot find a answer online for this.
I have tried changing types
{
StringBuilder sb = new StringBuilder();
Console.WriteLine("start?");
Console.ReadKey();
string[] lines = File.ReadAllLines(Directory.GetCurrentDirectory() + @"\Lines.txt");
WebClient wc = new WebClient();
int _checked = 0;
int _error = 0;
foreach(string line in lines)
{
++_checked;
//Pastebin text viewer
try
{
if (line.Contains("pastebin"))
{
var arac = line.Split('/');
//ERROR LINE CANNOT CONVERT TYPE 'STRING' TO 'STRING[]' Below
string[] downloaded = wc.DownloadString(arac[0] + arac[1] + @"//" + arac[2] + "/raw/" + arac[3]);
foreach(string line2 in downloaded)
{
if (line2.Contains(":")
{
//Console.WriteLine(arac[0] + arac[1] + @"//" + arac[2] + "/raw/" + arac[3]);
Console.WriteLine(arac[0] + arac[1] + @"//" + arac[2] + "/raw/" + arac[3]);
sb.Append(downloaded);
}
}
}
else
{
//Console.WriteLine("Not valid pastebin link!");
}
Console.Title = "Checked : " + _checked;
}
catch(WebException ex)
{
++_error;
Console.WriteLine("Error: " + _error);
}
}
File.WriteAllText(Directory.GetCurrentDirectory() + @"\Output " + _checked + ".txt", sb.ToString());
Console.Clear();
Console.WriteLine("FINISHED");
Console.ReadKey();
}```