C# Kinda stupid - but how do I get this to save...
15 minutes ago, Alexp10v2 said:No. I know why it looks different as it's saving the text from the main text box on the program.
All I want it to do is save the one line of text I have in a different text box where on the template, the corresponding line is.
(i.e: in the separate text box is line[1] from the original template. I've edited that line in the text box. Now I want to delete line[1] from the template and insert the "modified line" into the template on the specified line - in this case, line[1]) and then save the original template - ignoring the main text box with everything else in it.
Yes, sure I do understand. I just wanted to make sure that you did as well. It's not really a 'problem' with anything as such, it's a fundamental design issue. Specifically you need to have a think about your design... Try to consider things in terms of representing your data as some kind of model; a set of classes perhaps that you may then work with. Working directly with the text loaded in from the data source text file will only ultimately land you in a complete mess - which is where you're at right now.
From the example that you have provided it's obvious that you could map each line to at least one class. This way you have an abstraction to work against and you can represent the data in any way that you wish in your View. You will then be free to save it in either format; CSV or whatever else that you may choose.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now