Translation

  • Thread starter Thread starter Aaron
  • Start date Start date
A

Aaron

Im making a program that converts an abbreviated word to the full
word.
ie. MS => Microsoft

I already have 2 lists of words, one is the abbreviated word list
(list A) the other is the full word list (list B).

I'm new to c#, can someone help me write a function for this.


if a word in list A is found in textString then replace the
corresponding word in list B.


That's it


Thanks,


Aaron
 
Hi,

Take a look at the System.Collections.Specialized.StringDictionary class.
You can use the abbreviations as the keys and the expanded words as the
values in a StringDictionary instance.
 
Dmitriy said:
Hi,

Take a look at the System.Collections.Specialized.StringDictionary
class. You can use the abbreviations as the keys and the expanded
words as the values in a StringDictionary instance.

Isn't StringDictionary optimized for very small collections?

--
There are 10 kinds of people. Those who understand binary and those who
don't.

http://code.acadx.com
(Pull the pin to reply)
 
Frank Oquendo said:
Isn't StringDictionary optimized for very small collections?
No, StringDictionary is simply a strongly typed hashtable, maybe you are
thinking of ListDictionary? ListDictionary uses a singly linked list, which
isn't very useful for too large of acollection(MSDN recommends 10 or less).
 
Back
Top