Brandon Lewis

Brandon Lewis

  • NA
  • 527
  • 125.8k

Reading data from files

Jun 5 2007 1:13 PM
Ok, here's a relatively easy one for all you experienced C# coder's out there. I am making a small address book application and I write data to a .txt (.dat) file in this format:

Last Name, First Name" "Street Address" "City" "State" "Zip Code" "(Area Code)-Phone Number"

The quotation marks dont actually exist, but they are there for this example to show the single spaces I have between the data blocks to aid reading.
I was wondering how exactly I could read that data individually and restore the data to respective variables for display? I want to read the Last Name, place it in a variable, followed by the First Name, place it into a variable, and so on and so forth.
Im not even really sure how to go about it so any help I could get would be much appreciated. Im building this application to put in my portfolio for an internship and Im basically teaching myself :) Thank you!

-Scrap

Answers (9)