....insomma proprio il suo dovere no.... la riga § mi compare alla fine della finestra non all'inizio....
codice:public static string Mid(string a, int x, int l) { if (x - 1 + l > a.Length) return a.Substring(x - 1, a.Length - x + 1); else return a.Substring(x - 1, l); } public static int Instr(string a, string b, int x) { for (int k = x; k < a.Length + 1; k++) { if (Mid(a, k, b.Length) == b) return k; } return 0; } string file = "ciao.txt"; string r = File.ReadAllText(file); int z = Instr(r, "§", 1); textBox1.SelectionStart = z; textBox1.ScrollToCaret(); textBox1.Focus(); textBox1.DeselectAll();

Rispondi quotando