Use HashSet instead of "seen" Hashtable.

In our code (originally created in .Net 1.1)  there are a few examples of "seen" Hashtable pattern
 
Hashtable seen = new Hashtable();
for (int i = 0; i < nCount; i++)
{
    if (seen[key] == null)
    {
        //Do the changes
        seen.Add(key, key);
    }
}
 
It's better to use type-safe HashSet:
 
HashSet<string> seen = new HashSet<string>();
for (int i = 0; i < nCount; i++)
{
    if (!seen.Contains(key))
    {
        //Do the changes
        seen.Add(key);
    }
}

Don't Repeat Yourself(DRY principle) when modifying existing function

If there is an existing  non-trivial function and you need to change it , do NOT copy and paste it , but modify to satisfy new requirements.
You may be need to split a big function into small ones and call them in different order or with different parameters.
Often you need just to add extra parameter to the function and have if-else branches depending on a new parameter.
In some cases new change is actually a fix of the problem, that applicable to all usages of the function.
Remember that "Copy and Paste" is NOT a good way of code re-use.
 
I also strongly recommend to read Exploring Smelly Code article to avoid other anti-patterns.
 
«May»
SunMonTueWedThuFriSat
262728293012
3456789
10111213141516
17181920212223
24252627282930
31123456