简体   繁体   中英

What data structure fits a dictionary program?

I want to program a simple dictionary in C# so I will store the word and the meaning.

Should I use an XML file to store the data or store the entire data structure object( lets say I stored word/meaning pairs in a linked list or hashTable ) as a serialized object !

Use a serializable dictionary. You can either create your own (it's not that difficult) or you can ask google. There are many different solutions out there that you can use.

Why not create a SQL Database with a Table with 2 frields to contain the word -> definition.

The answer, I assume, would also depend on what you want to use this for, and if you have a central location to store data..

I think you should use SQL Database for that. You can use any ORM linke NHibernate, Linq to SQL or Entity Framework for insertion, update and deletion.

If your data is limited and you want a smaller footprint you can use SQL Server Compact Edition or SQLite

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM