Ok, first of all, im a beginer in C# (beginer in programing at all), and after a quite search on google, i couldnt find a solution on this one.
So, what i need to do is this:
I have 14 text boxes and a few checkbox’s:
Name, Birth Date, Place of birth and some other information of one person for example… I have one Save button that will save all that information in one .txt or .rtf file. Every time i enter those information’s in textBox’s, it will save it as file named by text entered in textBoxName.
For example:
textBoxName: Petar Milutinovic;
textBoxBirth: 01.11.1991;
textBoxCity: Paracin;
And when i click on Save button, it will save all those information on a file called Petar Milutinovic (same name as textBoxName) in this form:
Name: Petar Milutinovic;
Date of Birth: 01.11.1991;
City: Paracin;
Oh boy… I’m realy sorry for English spelling, its not my main (you noticed that one…). This problem have been quite a pain this days…
I think the easiest way (since you are a beginner) would be to create a string array that can hold 14 elements since you have 14 textboxes.
Then you can save it directly to file with:
Of course there are other more efficient ways to do this but I think this way is the most understandable.
(I forgot about your checkboxes, but you can accomplish the same goal with this concept)
EDIT:
For checkboxes or radio buttons you can use the Checked (or CheckState) property.
You could do something like:
where 1 represents true and 0 represents false. These values can be anything you like, as long as you read it back correctly.