예제 #1
0
        public wordStat getWSByWord(string s)
        {
            foreach (wordStat ws in words)
            {
                if (ws.word.Equals(s))
                {
                    // слово найдено списке, возвращаем
                    return(ws);
                }
            }
            wordStat WS = new wordStat(s);

            words.Add(WS);
            return(WS);
        }
예제 #2
0
        public void count(String s, uint a = 1)
        {
            s = s.ToLower();
            foreach (wordStat ws in words)
            {
                if (ws.isIn(s))
                {
                    ws.count(a);
                    return;
                }
            }
            wordStat newws = new wordStat(s);

            newws.count();
            words.Add(newws);
        }