Hey, new here, and pretty much new to c#.. Only programming I've done before was Pascal in 6th form, and that was horrendous, but fairly easy.

Anyways, I'm trying to learn c# (it's a module for the course I'm on) by programming things outside of the course.

We haven't got to this section yet, but I need it for the program I'm making..

So anyway, how would I read / write variables to a file, so I can use them later?

Essentially it's a addition program, which counts how much I smoke a day, but obviously I'm gonna have to close the program at some point, thus losing the data I'd put in.

Any ideas? (Sorry if this is a ridiculously basic question).

Oh, and I'm using Visual Studio 2010 (Net 4.0 I believe).

Thanks in advance.