First,
Code:
if (listbox.SelectedIndex > -1) { int index = listbox.SelectedIndex; Loan l = (Loan)listBox.Items[index]; listbox.Items.Remove(listbox.Items[index]); list.Remove(l); }
if (listbox.SelectedIndex > -1) { int index = listbox.SelectedIndex; Loan l = (Loan)listBox.Items[index]; listbox.Items.Remove(listbox.Items[index]); list.Remove(l); }
using (TextWriter tw = new StreamWriter(file)) { foreach (string s in strings) tw.WriteLine(s);//or whatever you are saving as string }
List<string> list = new List<string>(); using(TextReader reader = new StreamReader(/*filename*/) { while (!reader.EndOfStream) { string line = reader.ReadLine().Trim(); if (Regex.IsMatch(line, your url pattern, Regex.IgnoreCase)) list.Add
Leave a comment: