سلام دوستان عزیز
داشتم به برنامه می نوشم یه شرط switch گذاشتم .میخوام تمام case ها رو از یک فایل آپلود شده کپی کنم آیا امکانش هست؟
میخوام تمام دستورات switch از تکست آپلود شده کپی شهprivate void list_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
System.Net.WebClient WebClient = new System.Net.WebClient();
WebClient.DownloadFile("http://gorgpir.persiangig.com/.dx3eWazxdZ/hhhh.txt", @"hhhh.txt");
StreamReader reader = new StreamReader(@"hhhh.txt");
string a = reader.ReadToEnd();
string strName;
strName = list.Items
[list.SelectedIndex].ToString();
//---------------------------------------------------
switch (strName)
{
case "Episode1":
Process.Start(www.yahoo.com);
break;
case "Episode2":
Process.Start("http://google.com");
break;
case "Cathy":
break;
case "Betty":
break;
case "Edward":
break;
}
reader.Close();
reader.Dispose();
}
catch { }
}