Quantcast
Channel: Answers for "Loading data from a txt file - C#"
Browsing latest articles
Browse All 9 View Live

Answer by Drakestar

Your link doesn't seem to work. Generally, you use a streamreader to load in text. Here's some code (untested) that should get you on the right track: using System.Text; using System.IO; private bool...

View Article



Answer by joncham

Similar to the answer to the original question referenced, you could use the [File.ReadAllText][1] method: string text = System.IO.File.ReadAllText("myfile.txt"); [1]:...

View Article

Answer by JDyo2

It's better do using (theReader) { line = theReader.ReadLine(); if(line != null){ // While there's lines left in the text file, do this: do { // Do whatever you need to do with the text line, it's a...

View Article
Browsing latest articles
Browse All 9 View Live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>