Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



 1707

Having an issue saving lines to a different line in a txt with VB console

by D E A D L Y - 03 May, 2019 - 04:58 PM
This post is by a banned member (D E A D L Y) - Unhide
181
Posts
70
Threads
5 Years of service
#1
(This post was last modified: 03 May, 2019 - 05:03 PM by D E A D L Y.)
So I have everything set up properly, In the console I can write to give me 49000+ numbers but it all saves on 1 line instead of doing multiple, im using this function:
File.AppendAllText("hits.txt", contents);

                Console.WriteLine(contents, "hits.txt");


Clearly it only saves to 1 line for some reason, anyone know?


Basically formate is 12digit:8digit
so basically I need it to look like this:

123456789123:12345678
123456789123:12345678 
123456789123:12345678

Rn its doing this: 123456789123:12345678123456789123:12345678123456789123:12345678123456789123:12345678123456789123:12345678123456789123:12345678
I love people :)
This post is by a banned member (Itamai) - Unhide
This post is by a banned member (D E A D L Y) - Unhide
181
Posts
70
Threads
5 Years of service
#3
(03 May, 2019 - 05:26 PM)atiufi Wrote: Show More
try this

File.AppendAllText("hits.txt", contents + Environment.NewLine);

it worked thanks, didn't even think of that!
I love people :)
This post is by a banned member (Itamai) - Unhide

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!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 2 Guest(s)