Click here to Skip to main content
12,898,392 members (56,301 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
I have 5 text file. each record in each file contains two fields, city and salefigure.
i need create index in text file.
Posted 21-Nov-12 4:07am
richcb 21-Nov-12 10:11am
Not a question. You need to provide code you have tried and ask a specific question to point out where you are stuck.
boyliberal2007 21-Nov-12 10:26am
I don't known about this problem? please help me
OriginalGriff 21-Nov-12 10:26am
And? What is your problem? Where are you stuck?
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
Mathlab 21-Nov-12 10:40am
Since I read both your question you need to create a simple hash function so you can do integer searches
Nelek 21-Nov-12 17:34pm
Please don't think we can read minds or do astral projections to see your monitor. If you need help, the least you could do is to add some relevant code to your question or to explain your problem in such a way, that the users of CP can understand it. Otherwise, nobody will be able to help you.
what have you tried?[^]

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

According to Mathlab´s comment you can try to read all 5 text files to a hashtable/dictionary. Read them line by line, split each line into key and value and add them to the dictionary. The keys value has to be a list, because there may be more salesfigures for a city. Then write the dictionary to a text file.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100