Here is the code I've been playing with to load a text file into a TextBox control (don't laugh - I've only been doing C# for twenty five minutes)
private void openToolStripMenuItem_Click(object sender, EventArgs e)
if (OpenDialog.ShowDialog() == DialogResult.OK)
String Temp = TextBox.Lines;
using(StreamReader S=new StreamReader(OpenDialog.OpenFile()))
String line; int N=0;
Array.Resize(ref Temp, N + 1);
Temp[N] = line;
N = N + 1;
TextBox.Lines = Temp;
Help! I've got no idea what I'm doing!
Do you lot reckon I'd be better to start off with some C# console applications until I'm comfortable with the language? Will the Windows Forms stuff make a bit more sense?
I reckon from a few recent conversations that if I can learn C# fairly quickly, there may be quite a lot of work round my way in programming. I'm sick and tired of sales and want to write programs for a living now.
Anyone got any good links to C# tutorials as well? I haven't really looked myself yet but I'd like to know which ones you lot recommend.