I
Ignacio X. Domínguez
Hi. I'm developing a desktop application that needs to store some data in a
local file. Let's say for example that I want to have an address book with
names and phone numbers in a file. I would like to be able to retrieve the
name by searching for a given phone number the fastest I can.
I have considered the posibility of using XmlTextReader with something like:
<list>
<item number="1234567">
<name>John Doe</name>
</item>
<item number="9876*">
<name>Jane Doe</name>
</item>
</list>
or a simple text file with entries separated by special characters:
1234567~John Doe%9876*~Jane Doe%
and then use Split("%".ToCharArray()) to get an array of items, and then
Split("~".ToCharArray()) on every item to get name and number.
I this database will have around 200 entries (name and number in this
example), so I would like to know which one do you think will perform faster
and better on most configurations.
Thank you in advance.
Ignacio X. Domínguez
local file. Let's say for example that I want to have an address book with
names and phone numbers in a file. I would like to be able to retrieve the
name by searching for a given phone number the fastest I can.
I have considered the posibility of using XmlTextReader with something like:
<list>
<item number="1234567">
<name>John Doe</name>
</item>
<item number="9876*">
<name>Jane Doe</name>
</item>
</list>
or a simple text file with entries separated by special characters:
1234567~John Doe%9876*~Jane Doe%
and then use Split("%".ToCharArray()) to get an array of items, and then
Split("~".ToCharArray()) on every item to get name and number.
I this database will have around 200 entries (name and number in this
example), so I would like to know which one do you think will perform faster
and better on most configurations.
Thank you in advance.
Ignacio X. Domínguez