Skip to content

Some questiones from a beginner...

Vladimir

Asked Dec 27, 2006, 3:10 AM EST2 answers
Share
LinkedInX
Hello all, I´m new to C# and I´m still studying the beginners tutorials. Anyway, sometimes the fingers are quite faster than the required knowledge... Well, after completing my first applikation, a simple color calculator I would like to ad some features. My question: How can I import data from a color-measurement file (a simple text file) into a windows form? What form-element should I use? How can I sort the data? I would be greatfull for any possible hints -even if it means that I have to spend mutch more time with the tutorials ;) Kind Regards Vladimir

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Mahesh Chand
    0
    You can use the following article to learn how to read a text file in C#:
    http://www.c-sharpcorner.com/Language/CSAndTypesGAG.asp

    It depends on how do you want to display/use data read from the text file. Once data is read from the text file, you can store it in a DataTable or other objects and use the way you want.

    If your text file is going to store the settings, you may want to use app.Config file for that, which provides XML format to store key and values and use Configurations class to read values from the app.config.

    Hope it helps.
    0
  • 0
    Dear Mr. Chand, thank´s a lot for the infos you gave me. This will bring me further. Basically I need to read numerical values from a simple text-file witch is pre-generated by a vendor-specific software. I need to do some sorting operations and store the data into a DataTable. There is always a "reference" witch has to be compared to a "sample" by calculating various differences. I also intend to graph them in special, color-related diagrams. It´s probably a huge project for a beginner like me -but let´s be optimistic and try the impossible ;) Kind regards Vladimir
    0